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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Inserting a Row into a GDBG

Thread ID:





18825 Sep 9,2004 06:20 PM UTC Sep 9,2004 06:47 PM UTC WinForms 1
Tags: GridControl
Administrator [Syncfusion]
Asked On September 9, 2004 06:20 PM UTC

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 Ken

Administrator [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon