J
Jaco_vd_Walt
Hi
I have designed a datagrid control that is inherited from the base
datagrid control. The main problem I have is when the grid is in edit
mode and the user clicks Update. I have to write back the values that
have been enterd to my datasource. This is prety easy if you know the
order of the columns and to which datafields the controls are bound
to. I unfortunatly do not know the order of the columns and to what
they are bound. The order of the columns do not always match the order
of the datafields in my datatable. For bound columns its easy, it has
a DataField property, but what about Template Columns? How do I at run
time determine which datafield a template column is bound to. At
Design time the control has a DataBindings property I have tried a
many things and I just cant seem to get hold of the datafield name
that a column is bound to at run time.
Any help will be greatly appreciated.
Thanks
Jaco
I have designed a datagrid control that is inherited from the base
datagrid control. The main problem I have is when the grid is in edit
mode and the user clicks Update. I have to write back the values that
have been enterd to my datasource. This is prety easy if you know the
order of the columns and to which datafields the controls are bound
to. I unfortunatly do not know the order of the columns and to what
they are bound. The order of the columns do not always match the order
of the datafields in my datatable. For bound columns its easy, it has
a DataField property, but what about Template Columns? How do I at run
time determine which datafield a template column is bound to. At
Design time the control has a DataBindings property I have tried a
many things and I just cant seem to get hold of the datafield name
that a column is bound to at run time.
Any help will be greatly appreciated.
Thanks
Jaco