Store Hidden GridView Columns in a DataKey(victorchen.info)
submitted by
thevictorchen(45) 3 years, 3 months ago
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.
|category: C#
|Views: 15
tags:
C# another
Everyones tags:
Your Tags: