This is a migrated thread and some comments may be shown as answers.
Update prevent accessing of GridDataItem for hidden columns
2 Answers 37 Views
This is a migrated thread and some comments may be shown as answers.
Danny
Top achievements
Rank 1
Danny asked on 25 Feb 2013, 03:50 PM
We have a number of grids in our application, all of which have hidden fields. 

Up until recently we have accessed this items when clicking on a control. We recently upgraded Radcontrols to the latest version, and now we cannot access those hidden fields. We can still access fields to do not have the visibility set to false. 

We have tried setting them as visible, and the column width as 0px. But this fails on some older browsers and makes the column width about 5px. 

Any help would be greatly appreciated. 
     

                GridDataItem item = (GridDataItem)e.Item;

                String EmailActionLogID = Convert.ToString(item.GetDataKeyValue("EmailActionLogID"));

                String EMLEmailFrom = item["mailfrom"].Text;
                String EMLRecipient = item["rcptto"].Text;
                String EMLDateTimeReceived = item["datetimeReceived"].Text;
                String EMLGuid = item["emlGUID"].Text;
                String EMLQuarantineID = item["ActionValue"].Text;

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 26 Feb 2013, 05:33 AM
Hi,

I guess you are not able to access the RadGrid Columns when you set their Visible property to False. Please try setting the Display Property to False instead of Visible property as shown below.

ASPX:
<telerik:GridBoundColumn DataField="ShipName" Display="false">
</telerik:GridBoundColumn>

Thanks,
Shinu.
0
Markus
Top achievements
Rank 2
answered on 20 Aug 2013, 02:16 PM
Dear Shinu

Had exactly the same problem as Danny. You answer was the solutino.

Thank's a lot.

Markus
Tags
Grid
Asked by
Danny
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Markus
Top achievements
Rank 2
Share this question
or