Error!
Success!

Store Hidden GridView Columns in a DataKey

0
kicks

Store Hidden GridView Columns in a DataKey  (Unpublished)

When binding a DataTable to a GridView, I always map every column in the DataTable to a new column in GridView (whether it be manually or automatic). I would then hide the columns I did not want to display. In this way, I could still access values in the hidden columns on GridView events such as RowDataBound. A common example of this situation is creating a hidden column for the row’s unique database id.


Kicked By:
Drop Kicked By: