D
Don
I created a Web User Control in my project and need to use it in a
datagrid. The data in this control needs to be updated and the control
has several properties that need to be databound.
Using the designer I created a a dataGrid with an Edit, Update, Cancel
column, and an empty template column.
I have overridden ItemDataBound to instantiate my control, set the
properties using DataItems, and add this control to the template column
in the grid. This part works and i see the data. When the users
clciks edit they get an editable version of my control which also work
as expected.
When the users clicks update I need to read the data from my control
and save it to the database. The problem is I cannot find the control.
It should be in e.Item.Cells(1) but there are no controls in the cell.
The only other Cells is 0 and it is not here.
How do I reference my User Control?
Don
datagrid. The data in this control needs to be updated and the control
has several properties that need to be databound.
Using the designer I created a a dataGrid with an Edit, Update, Cancel
column, and an empty template column.
I have overridden ItemDataBound to instantiate my control, set the
properties using DataItems, and add this control to the template column
in the grid. This part works and i see the data. When the users
clciks edit they get an editable version of my control which also work
as expected.
When the users clicks update I need to read the data from my control
and save it to the database. The problem is I cannot find the control.
It should be in e.Item.Cells(1) but there are no controls in the cell.
The only other Cells is 0 and it is not here.
How do I reference my User Control?
Don