4 Answers, 1 is accepted
0
Hello Shane,
For your convenience I created a sample that demonstrates how to attain this.
I hope this helps.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
For your convenience I created a sample that demonstrates how to attain this.
I hope this helps.
Regards,
Daniel
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
shane
Top achievements
Rank 1
answered on 13 Jul 2009, 03:05 AM
How to achieve this in client side
0
shane
Top achievements
Rank 1
answered on 13 Jul 2009, 03:16 AM
Actually,I want to set the KeyColumn visible to false,but I find I cant retrieve its value in client side by cell.innerHtml,so I try to change the column width to 0px,but the Column still in grid.How can I do???
0
Shinu
Top achievements
Rank 2
answered on 13 Jul 2009, 04:32 AM
Hi Shane,
Try setting the ClientDataKeyNames to the primary DataField. When you add the value of the DateField to the ClientDataKeyNames array, RadGrid makes that column's value available through the getDataKeyValue() function of the GridDataItem client-side object.
.aspx
.javascript
Checkout the link to know more about Extracting key values client-side
-Shinu.
Try setting the ClientDataKeyNames to the primary DataField. When you add the value of the DateField to the ClientDataKeyNames array, RadGrid makes that column's value available through the getDataKeyValue() function of the GridDataItem client-side object.
.aspx
| . . . |
| <telerik:GridBoundColumn DataField="CustomerID" Visible="False" HeaderText="CustomerID" SortExpression="CustomerID" UniqueName="CustomerID"> |
| </telerik:GridBoundColumn> |
| . . . |
.javascript
| <script type="text/javascript"> |
| function RowSelected(sender, args) //Client side Rowselected event of radgrid |
| { |
| alert(args.getDataKeyValue("CompanyName")); |
| } |
| </script> |
Checkout the link to know more about Extracting key values client-side
-Shinu.