how to get the text value of a cell in a column that is not visibl

B

Brian

I have a grid control with an invisible column. I use something like this
usually:
string s = gvDNR.SelectedRow.Cells[1].Text;
however when the column is not visible the text is always empty. Where is it
kept?
 
J

Jay Pondy

If I remember correctly you have to use a template field:

<asp:TemplateField Visible="false">
<ItemTemplate>
<asp:Label ID="lblPKID" runat="server" Text='<%# Eval("PKID") %>' />
</ItemTemplate>
</asp:TemplateField>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top