By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,524 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,524 IT Pros & Developers. It's quick & easy.

Retrieve Datagrid TemplateColumn Datafield value

P: n/a
How do you get the "Datafield" property of data that's in a Template
Column of a Grid?

I am using editable Datagrids with Template Columns.

When using Boundcolumns, I just used:
ColName = CType(dg.Columns(i), BoundColumn).DataField

But this doesn't work with TemplateColumns.

I have tried building an array containing binding information during
the grid's ItemDataBound or ItemCreated events, but I can't seem to
extract the information from the DataGridItemEventArgs parameter.

Basically I just want to know the Schema Column Name that the DataGrid
column is bound to. This would make it much easier to write generic
data manipulation routines to move data from the Grid back into the
Dataset when using editable Grids.

Any help (or examples) would be greatly appreciated.


Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.