S
sunss
Given a webform control, such as a textbox, I'd like to find out what
underlying column the control is bound to. After much searching
around I haven't come close to a solution yet for asp.net, although in
a winform its fairly simply achieved like so:
MyTextBox.DataBindings(0).BindingMemberInfo.BindingField.ToString()
I'm trying to perform a simple loop against a collection of bound
controls and set the 'tooltip' of each control to be the bound column
name.
The closest I've come is declaratively against the control itself,
although this requires me to already know the column name/index!
CType(Container.DataItem,
System.Data.DataRowView).DataView.Table.Columns(0).ColumnName
Is there an equivalent to DataBindings in asp.net, or is it just not
as clever as winforms?
Any assistance gratefully received!
underlying column the control is bound to. After much searching
around I haven't come close to a solution yet for asp.net, although in
a winform its fairly simply achieved like so:
MyTextBox.DataBindings(0).BindingMemberInfo.BindingField.ToString()
I'm trying to perform a simple loop against a collection of bound
controls and set the 'tooltip' of each control to be the bound column
name.
The closest I've come is declaratively against the control itself,
although this requires me to already know the column name/index!
CType(Container.DataItem,
System.Data.DataRowView).DataView.Table.Columns(0).ColumnName
Is there an equivalent to DataBindings in asp.net, or is it just not
as clever as winforms?
Any assistance gratefully received!