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

RadGrid get value of hidden field on button click

1 Answer 192 Views
Grid
This is a migrated thread and some comments may be shown as answers.
TRA
Top achievements
Rank 1
TRA asked on 10 Dec 2013, 04:06 PM

I have a grid that has a GridButtonColumn in it.  I have a command name set and call the command name on the grid_itemCommand.  I have a hidden field called PKEY that I need to get the value of when the button on that row it clicked.  How can I get the value of that hidden field?  Right now all I get is  , but if I set the visibility to True I get the value.

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 11 Dec 2013, 04:39 AM
Hi,

Please make sure that you hide the column by setting Display="false" and not Visible="false. When you set visibility it cannot be accessed in the code behind, so set Display property of the column to have its access.

ASPX:
<telerik:GridBoundColumn UniqueName="ID" DataField="ID" Display="false">

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