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

Is it possible to drag rows in a GridDataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

17518 Aug 10,2004 06:20 PM UTC Aug 12,2004 04:30 PM UTC Windows Forms 3
loading
Tags: GridControl
Doug Lind
Asked On August 10, 2004 06:20 PM UTC

I need to be able to move rows within a GDBG. Using the default settings, I can get the drag pointer to show and move the row outline. But upon release, nothing happens. Column dragging works fine. What am I missing? Doug

Administrator [Syncfusion]
Replied On August 10, 2004 07:40 PM UTC

Moving rows is not supported directly in a GridDataBoundGrid as the grid just displays the rows as they appear in the DataSource. So, depending on what your DataSource is, this may or may not be easy to do. For example, an ArrayList is easy to move rows, but in a DataTable it is not. If you want to support moving rows, you can set this property, this.gridDataBoundGrid1.Model.Options.AllowDragSelectedRows = true; , and then handle grid.Model.RowMoving and explicitly move the rows in your datasource as indicated by the event args. The grid will not try to move teh rows, it will just let you know what rows you need to move in your datasource.

FJ
Replied On August 12, 2004 03:55 PM UTC

How did you have Column Dragging working fine? (a sample won''t hurt ;-)) Thank you >I need to be able to move rows within a GDBG. Using the default settings, I can get the drag pointer to show and move the row outline. But upon release, nothing happens. Column dragging works fine. > >What am I missing? > >Doug

Administrator [Syncfusion]
Replied On August 12, 2004 04:30 PM UTC

Column dragging works because there is a grid.GridBoundColumns property (or grid.Binder.InternalColumns property if you don''t explicitly add gridboundcolumns) that determines the order of the columns. In a GridDataBoundgrid, the normal usage is a few columns and many, many rows. So, it seems OK to expect to rearrange one of a few columns but it does not seem neccesary to reaarange one of 100000 rows. (At least that is the thinking behind supporting moving columns but not rows.) Just trying to move rows in a DataTable is problematic. Here is a forum thread that shows one way you can move rows in a DataTable (using heroic efforts). http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=16227

CONFIRMATION

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.

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

;