Hi,
When there is MultipleRowSelection = true & EnablePostBackOnRowClick = true, the event "SelectedIndexChanged" is fired everytime I check/uncheck row. That's great. However, When I tried to uncheck the last selected row (so that now the grid has no row selected), the event "SelectedIndexChange" didn't fire.
I found a similiar post in here:
http://www.telerik.com/community/forums/aspnet-ajax/grid/radgrid-deselect-not-always-firing-selectedindexchanged.aspx
in which they suggested work-around using Javascript:
//JavaScript
function RowClick(sender, eventArgs) { sender.get_masterTableView().fireCommand("Select", eventArgs.get_itemIndexHierarchical()); }
//Code-Behind
PatientList_Grid.ClientSettings.ClientEvents.OnRowClick = "RowClick";
PatientList_Grid.ClientSettings.ClientEvents.OnRowDeselecting = "RowClick";
private void Grid_PatientList_SelectedIndexChanged(object sender, EventArgs e) { RadGrid grd = sender as RadGrid; int SelectedCount = grd.SelectedItem.Count; lbl_DIsplay.Text = "Number of Item Selected: " + SelectedCount; } I did it as above and now the event "SelectedIndexChanged" does fire on deselecting last row. But, in the "SelectedIndexChanged" event, the grid show that it still have one item selected:
It still show up as 1, even though, you see, since the last selected has been deselected, it should be 0.
I'm using the latest version of Telerik AJAX control.
Thanks
Lamk.
