I have a problem handling the inserts to a grid using "InPlace" edit and "MultiROwEdit".
The Grid is bound to a DataSet (SQL) table. I want to be able to keep inserting multiple rows (items) into the grid and edit them.
The "AllowAutomaticInserts" is set to false. I am catching the insert events in "OnItemDataBound" handler.
In there, I am creating a new 'empty' data row and adding it to the table. Then, I bind the row to inserted item, make it aditable, and finally I change "IsItemInserted" to false to allow for more inserts.
The Grid is bound to a DataSet (SQL) table. I want to be able to keep inserting multiple rows (items) into the grid and edit them.
The "AllowAutomaticInserts" is set to false. I am catching the insert events in "OnItemDataBound" handler.
In there, I am creating a new 'empty' data row and adding it to the table. Then, I bind the row to inserted item, make it aditable, and finally I change "IsItemInserted" to false to allow for more inserts.
DataTable.AddRow(row); // add row to table
insert_Item.DataItem = row;
insert_Item.Edit =
true;
rdgrd.MasterTableView.IsItemInserted =
false;
This turns the last item in the grid into regular, non-editable item unless Refresh is pressed.
I was wondering wether there is a cleaner way of doing multiple inserts to a grid where all rows are turned into editable items. I could not find any single example exploring this scenario.
Thank you,
Chris