May 06, 2015, 6:51 AM
[CLOSED] Facing problem with checkbox selection problem in gridpanel.
I have two gridpanels. On clicking the column of the first grid, the second grid loads, like below image:
In the image you can see, I have clicked on CPS, and its corresponding values are loaded in the next grid with the checkboxes selected for few of the rows.
Now I click on a different column, say ADV TECH, and its corresponding data is loaded on the next grid.
Now I click back on CPS, and as you can see in the image, the checkboxes are not being checked properly. Few of them shud be deselected, but it is checking all.
below is the code am using to do the checkboxes selection during binding the grid.
In the image you can see, I have clicked on CPS, and its corresponding values are loaded in the next grid with the checkboxes selected for few of the rows.
Now I click on a different column, say ADV TECH, and its corresponding data is loaded on the next grid.
Now I click back on CPS, and as you can see in the image, the checkboxes are not being checked properly. Few of them shud be deselected, but it is checking all.
below is the code am using to do the checkboxes selection during binding the grid.
List<int> t3NamesInUse = new List<int>();
t3NamesInUse = IsInUseTiersList(dtTier3Mapping);
RowSelectionModel sm = this.grdTier3Mapping.SelectionModel.Primary as RowSelectionModel;
sm.ClearSelection();
// sm.SelectedRow = new SelectedRow(2);
foreach (int j in t3NamesInUse)
{
sm.SelectedRows.Add(new SelectedRow(j));
}
sm.UpdateSelection();
In the above code t3NamesInUse is a list of int, which gives the list of column ids which are to be checked. This list am sending in a foreach loop to have the selected rows.
Last edited by Daniil; May 13, 2015 at 8:24 AM.
Reason: [CLOSED]