Mar 19, 2014, 4:07 AM
How to deselect checked rows after reload the grid panel with checkboxselectionmodel in version2.1
A gridpanel is used in a web user control "window1", the selection model is CheckboxSelectionModel as follow:
But I want all the rows deselected.
I used these code to deselect or clear the selected rows:
<SelectionModel>
<ext:CheckboxSelectionModel runat="server" RowSpan="1" Mode="Multi" />
</SelectionModel>
I checked some rows and closed the widow1, then open the window and reload the datasouse of the girdpanel again. The selected rows is still selected as follows:But I want all the rows deselected.
I used these code to deselect or clear the selected rows:
protected void StorePart_Refresh(object sender, StoreReadDataEventArgs e)
{
......
//RowSelectionModel sm = this.GridPanelPart.SelectionModel.Primary as RowSelectionModel;
//sm.SelectedRows.Clear();
//sm.UpdateSelection();
CheckboxSelectionModel cbm = this.GridPanelPart.SelectionModel.Primary as CheckboxSelectionModel;
cbm.SelectedRows.Clear();
cbm.UpdateSelection();
//cbm.ClearSelection();
//cbm.DeselectAll();
}
But all these methods didn't work . What message did I Missed ?