Aha, yes indeed that is correct. DataField is not a member of that class. However, it IS a member of derived classes that provide the ability to bind to a column in the underlying data bound to a grid such as the BoundColumn class.
When you iterate thru the columns collection of the datagrid, you get DataGridColumn objects, not their final column class types (BoundColumn, TemplateColumn, etc.). So you'll need to test each DataGridColumn you iterate thru to see if it is of type BoundColumn (or which ever other types support DataField), then you can emit that field's value.
-
Peter