S
Sal
I 've been dealing with this problem for a while now.
I have a datagrid in which one column is a template column, encompassing
textboxes (1 hidden, 1 visible) and bound to the same data source column.
Also the footer contains a button to save contents of the textboxes.
Viewstate is on.
I also have a custom header row that I place on the grid:
This line instantiates the custom row: Dim DGHeaderRow As New
DataGridItem(-1, 0, ListItemType.Header)
This line adds the custom row to the datagrid:
DGPrtTrk.Controls(0).Controls.AddAt(0, DGHeaderRow)
What I'm finding is that the custom row will interfere with how the template
column's footer button works. Upon 1st click of this button, to save the
contents of the textboxes, the page reloads but the itemcommand event
doesn't fire. The page comes back and all of the item rows contents are
shifted down one row, so the last item row's contents are in the footer row.
Upon 2nd click of this button the page reloads and the itemcommand event now
does fire. Also the gird appears how it should appear, all item rows in
their right place.
If I comment out the custom row code while keeping everything else the same,
the itemcommand event fires on the first try, everytime.
Does anyone know why this is happening or even experienced this?
Sal
I have a datagrid in which one column is a template column, encompassing
textboxes (1 hidden, 1 visible) and bound to the same data source column.
Also the footer contains a button to save contents of the textboxes.
Viewstate is on.
I also have a custom header row that I place on the grid:
This line instantiates the custom row: Dim DGHeaderRow As New
DataGridItem(-1, 0, ListItemType.Header)
This line adds the custom row to the datagrid:
DGPrtTrk.Controls(0).Controls.AddAt(0, DGHeaderRow)
What I'm finding is that the custom row will interfere with how the template
column's footer button works. Upon 1st click of this button, to save the
contents of the textboxes, the page reloads but the itemcommand event
doesn't fire. The page comes back and all of the item rows contents are
shifted down one row, so the last item row's contents are in the footer row.
Upon 2nd click of this button the page reloads and the itemcommand event now
does fire. Also the gird appears how it should appear, all item rows in
their right place.
If I comment out the custom row code while keeping everything else the same,
the itemcommand event fires on the first try, everytime.
Does anyone know why this is happening or even experienced this?
Sal