We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Inserting a Row into a GDBG

I was just given a new requirement. Now the user must be allowed to insert a row before the currently selected row. Is this possible in version 2.0.5.0? Ken

1 Reply

AD Administrator Syncfusion Team September 9, 2004 06:47 PM UTC

If your DataSource is an ArrayList or something that supports inserting new items at arbitary positions, then yes. But if your datasource is a DataTable, then there is no simple way to do this. The reason is that all new rows at added at the end of a DataTable (even though there is a DataTable.Rows.Insert method). If you use a GridControl that holds the data, then it is simple to insert row anywhere. One solution when using a DataTable is to add an additional column that holds the row position. Then you can sort the DataTable on this new column. Then you can reorder the display by changing the values in this new column.

Loader.
Live Chat Icon For mobile
Up arrow icon