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

Multiple GridClientSelectColumns in same grid

2 Answers 132 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Rafeek Basheer
Top achievements
Rank 1
Rafeek Basheer asked on 05 Jul 2010, 02:14 PM
Hello,
Is it possible to have multiple GridClientSelectColumns in the same grid with the 'AllowMultipleRowSelection' set to true? The issue that I am having is that when I click one columns header checkbox and it goes and checks the other columns checkboxes.
Any ideas?
Regards,
RB

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 05 Jul 2010, 02:28 PM
Hello,

I am not quite sure about your requirement. If you want to use multiple select column and to customize the selection modes, then you could use checkboxes in ItemTemplate of GridTemplateColumn and explicitly select the row from client code.

In order to achieve this, you can access the checkboxes in ItemCreated event and attach the "onclick" event to it by passing the ItemIndex. In the client event handler, get the index and, and access the corresponding item to select (invoke the set_selected() method of dataitem client object to select it)


-Shinu.
0
Rafeek Basheer
Top achievements
Rank 1
answered on 07 Jul 2010, 10:04 AM
Thanks Shinu for your reply. I was getting myself confused with the GridClientSelectColumns.

But I have an other question sort of related in that on the client side check boxes I have added an OnClick to call a javascript method inside which I need to access my telerik grid on the page. I have tried to use the following but in an seperate .js file rather than on the aspx page itself. And the grid always returns null. What would be the ideal way to access the grid so that I know how many rows are in the grid and can access the checkboxes to either set the value or get the value.
  var grid = $find('<%=radGrid.ClientID %>');

Your reply would be much appreciated.

Regards,
RB
Tags
Grid
Asked by
Rafeek Basheer
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Rafeek Basheer
Top achievements
Rank 1
Share this question
or