This is a migrated thread and some comments may be shown as answers.

GridClientSelectColumn with multi row selection

1 Answer 24 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Alyssa
Top achievements
Rank 1
Alyssa asked on 07 Nov 2013, 01:00 PM
Hi,
i have used GridClientSelectColumn with multi row selection. The selection works fine, but if i click any other row all oder selected rows are deselected and only the current row is selected. How to overcome this? When i select a row i want only that to be unchecked. Please help.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 07 Nov 2013, 01:07 PM
Hi Alyssa,

Please try the following code snippet.

ASPX:
<telerik:GridClientSelectColumn UniqueName="ClientSelectColumn">
</telerik:GridClientSelectColumn>
 
<ClientSettings Selecting-AllowRowSelect="true" Selecting-UseClientSelectColumnOnly="true">
<ClientEvents OnRowClick="toggleSelection" />
</ClientSettings>

JS:
function toggleSelection(sender, args)
 {
  args.get_gridDataItem().set_selected(!args.get_gridDataItem().get_selected());
 }

Thanks,
Princy
Tags
Grid
Asked by
Alyssa
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Share this question
or