Newbie : Gridview question

  • Thread starter Thread starter John
  • Start date Start date
J

John

Hi all,

I have a gridview on my page and templatecolumns defined in it. I also have
a couple of databound columns. The datatable being bound to the gridview
contains a column (defined as a datacolumn so as to get the value) and in
the ItemDataBound I can access this value but only when the databound
column's visibility is set to true. If I hide the visibility at design-time
I can't get access to the value at run-time. I don't want to show this
column.

How do I go about geting the value so as to do someting with it but not show
the databound column?

Regards
John.
 
Hi John,

You can put these values in DataKeyNames, and retrieve by

..DataKeys[row_index].Values[col_index]

HTH

Elton Wang
 

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

Back
Top