Any tips on how to handle this when using client side row selection?
Here's what I am trying to do now which is handling the
to see if the row is disabled and canceling the selection if it is.
This works when individually trying to select a disabled row (prevents it), but when clicking the header row checkbox (to Select/DeSelect all) the disabled rows still get checked.
How can I prevent this?
Here's what I am trying to do now which is handling the
OnRowSelecting eventto see if the row is disabled and canceling the selection if it is.
<script type="text/javascript"> function RowSelecting(sender, eventArgs) { //Prevent "disabled" grid RowSelecting from being selected (individually) var grid = sender; var MasterTable = grid.get_masterTableView(); var row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()]; if (row.disabled) eventArgs.set_cancel(true) }</script> <radG:RadGrid ID="RadGrid1" AllowMultiRowSelection="true" runat="server"> <MasterTableView Width="100%"> <Columns> <radG:GridClientSelectColumn UniqueName="ClientSelectColumn" /> </Columns> </MasterTableView> <ClientSettings ApplyStylesOnClient="True"> <Selecting AllowRowSelect="True"></Selecting> <ClientEvents OnRowSelecting="RowSelecting" /> </ClientSettings> </radG:RadGrid>This works when individually trying to select a disabled row (prevents it), but when clicking the header row checkbox (to Select/DeSelect all) the disabled rows still get checked.
How can I prevent this?