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

[Solved] Accessing Cells that are not visible?

2 Answers 125 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Vince
Top achievements
Rank 1
Vince asked on 04 Mar 2013, 08:22 PM
Upgraded to (v.2013.1.220.40) and now my code that used to work doesn't.  Anyone else have this problem, or can offer some suggestions?

Protected Sub grdSearch_ItemDataBound(sender As Object, e As Telerik.Web.UI.GridItemEventArgs) Handles grdSearch.ItemDataBound

        If TypeOf e.Item Is GridDataItem Then
            Dim dataItem As GridDataItem = CType(e.Item, GridDataItem)

Dim sID As String = dataItem("ID").Text     ***has value of "nbsp;" since upgrade. It used to give me a legit value***

        End If

    End Sub

            <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" FilterControlAltText="Filter ID column" HeaderText="ID" ReadOnly="False" 
                SortExpression="ID" UniqueName="ID" Visible="False">
                <ItemStyle Wrap="False" />
            </telerik:GridBoundColumn>

Thanks,
Andrew

2 Answers, 1 is accepted

Sort by
0
Vince
Top achievements
Rank 1
answered on 04 Mar 2013, 08:45 PM
For whatever reason VISIBLE=false used to work, but doesn't now...

If I use DISPLAY=false, it works.

http://www.telerik.com/community/forums/aspnet-ajax/grid/getcellbycolumnuniquename-only-works-for-visible-columns.aspx



0
Eyup
Telerik team
answered on 07 Mar 2013, 08:51 AM
Hi Vince,

The following topic explains the reasons and consequences for the mentioned change:
http://www.telerik.com/community/forums/aspnet-ajax/grid/breaking-change-hidden-column-cell-text-is-not-persisted-in-viewstate.aspx

Hope the clarification was helpful.

Greetings,
Eyup
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Grid
Asked by
Vince
Top achievements
Rank 1
Answers by
Vince
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or