Prev: Formview ChangeMode Problem
Next: Ajax.net Development to Production = javascript error (baseType)
From: Chris Botha on 22 Mar 2007 23:45 I have a gridview with bound columns as well as auto select turned on and everything works well. The 1st column is the record ID and as seeing this does not help the user, I want to hide it, so I set the visible property of the column to false. Now on post-back when selecting a record, the cell is still there, however it is empty - it does not contain the ID any more, it contains an empty string. My first opinion is that this is not so extremely useful then. My question would be how do I hide a column but still have the value on post-back? Thanks.
From: Muhammad Naveed Yaseen on 23 Mar 2007 01:45 Preferred choice would be to use DataKeyNames property of GridView and then access it through GridView's key collection (DataKeys). If that is not possible then a TemplateField may be used with a Literal or Label with visible set false.
|
Pages: 1 Prev: Formview ChangeMode Problem Next: Ajax.net Development to Production = javascript error (baseType) |