J
Josh Golden
sorry for so many posts recently
i am loading a datagrid from a datatable. the shape of the datatable is not
known at design time. i want to dynamically add event handlers to the
datagrid textboxes. it would be really easy if i were using a
DataGridTableStyle at design time but that means i know the columns.
how do i loop through the textboxes in the datagrid? i will have to do this
after i've used the setDataBinding method of the datagrid. that's the only
way how i will know how many columns (DataGridTextBoxColumn) there are.
for each x as DataGridTextBoxColumn in dgOrders.< ? >
AddHandler x.TextBox.MouseDown, New MouseEventHandler(AddressOf
someMouseDownEvent)
AddHandler x.TextBox.DoubleClick, New EventHandler(AddressOf
someDoubleClickEvent)
next
i am loading a datagrid from a datatable. the shape of the datatable is not
known at design time. i want to dynamically add event handlers to the
datagrid textboxes. it would be really easy if i were using a
DataGridTableStyle at design time but that means i know the columns.
how do i loop through the textboxes in the datagrid? i will have to do this
after i've used the setDataBinding method of the datagrid. that's the only
way how i will know how many columns (DataGridTextBoxColumn) there are.
for each x as DataGridTextBoxColumn in dgOrders.< ? >
AddHandler x.TextBox.MouseDown, New MouseEventHandler(AddressOf
someMouseDownEvent)
AddHandler x.TextBox.DoubleClick, New EventHandler(AddressOf
someDoubleClickEvent)
next