Aug 14, 2010, 2:42 AM
How to let my CheckBox selected by default in my GridPanel with its CheckboxSelectionModel?
Hi :
I have a Gridpanel with CheckboxSelectionModel. Now how can I let my CheckBoxs selected by default if I have some dateSource?
Let us see my code:
I have a Gridpanel with CheckboxSelectionModel. Now how can I let my CheckBoxs selected by default if I have some dateSource?
Let us see my code:
RowSelectionModel sm = GridPanelBU.SelectionModel.Primary as RowSelectionModel;
SelectedRow row = new SelectedRow();
foreach (var s in mylist) //"mylist" means which rows need to be checked
{
string buID = s.bu_id;
row.RecordID = buID;
sm.SelectedRows.Add(row);
}
But it has no use. Hope your helps. Thanks.