D
DC
Hi,
I am using a GridView to present data in a DataTable, which I store
only in ViewState and when the user hits the "OK" button the rows in
the DataTable will be used to execute transactions.
I need the ability to insert new rows (which is easily done with
DataTable.Rows.Add(newRow) and rebinding) and then present a row with
different TemplateFields for those rows (I need multiple rows in this
insert state).
I could not get this to work with an CommandField, I think this was
not designed to be able to edit underlying DataTable objects?
I thought that the Insert/EditItemTemplates would be chosen by the
state of the row. I need something to convince the GridView to display
a number of rows that I specify in code behind with the
EditItemTemplate.
I also tried to selectively hide and show certain controls only using
the ItemTemplate and I think this is possible - just with way more
effort.
TIA for any hints.
Regards
DC
I am using a GridView to present data in a DataTable, which I store
only in ViewState and when the user hits the "OK" button the rows in
the DataTable will be used to execute transactions.
I need the ability to insert new rows (which is easily done with
DataTable.Rows.Add(newRow) and rebinding) and then present a row with
different TemplateFields for those rows (I need multiple rows in this
insert state).
I could not get this to work with an CommandField, I think this was
not designed to be able to edit underlying DataTable objects?
I thought that the Insert/EditItemTemplates would be chosen by the
state of the row. I need something to convince the GridView to display
a number of rows that I specify in code behind with the
EditItemTemplate.
I also tried to selectively hide and show certain controls only using
the ItemTemplate and I think this is possible - just with way more
effort.
TIA for any hints.
Regards
DC