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

Change Radgrid row color when checkbox selected

1 Answer 248 Views
Grid
This is a migrated thread and some comments may be shown as answers.
soo
Top achievements
Rank 1
soo asked on 06 May 2008, 01:01 AM
Hi,

I want to change row color when i checked the checkbox inside the radgrid by using javascript. How can i detect which row selected and what is the code to change selected row in radgrid to other color?

Below is my radgrid check box column...

** Need in javascript code

<radG:GridTemplateColumn AllowFiltering="false" UniqueName="CheckBoxTemplateColumn">

<HeaderTemplate>

<input id="chkAllItems" type="checkbox" onclick="CheckAllDataGridCheckBoxes('chkItemChecked',document.forms[0].chkAllItems.checked)" />

</HeaderTemplate>

<HeaderStyle Width="15px" />

<ItemTemplate>

<input id="chkItems" type="checkbox" runat="server" onclick="SelectedRowCount();" />

</ItemTemplate>

<ItemStyle Width="15px" />

</radG:GridTemplateColumn>


Please help.
 
Thanks,
Soo

1 Answer, 1 is accepted

Sort by
0
Kiara
Top achievements
Rank 1
answered on 06 May 2008, 11:16 AM
You will get that without single line of code if you replace the template column with GridClientSelectColumn (holding checkboxes for selection):

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Grid/Examples/Client/Selecting/DefaultCS.aspx

Kiara


Tags
Grid
Asked by
soo
Top achievements
Rank 1
Answers by
Kiara
Top achievements
Rank 1
Share this question
or