how to retrieve the selected row cell value if it is visible property is false in gridview?
how to retrieve the selected ro开发者_如何学Pythonw cell value if it is visible property is false in gridview ?
Don't set Visible to false. Set Style Display to none
Create a css class like this
<style type="text/css">
.hidden
{
display:none;
}
</style>
And set ItemStyle-CssClass, HeaderStyle-CssClass to hidden . Then, you should be able to read cell text. If you set Visible to false, you will not be able to retrieve the value as the column won't be databound.
http://www.dotnetspark.com/kb/1937-how-to-get-hidden-column-value-gridview.aspx
精彩评论