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

Drag and drop for grid records..

Thread ID:

Created:

Updated:

Platform:

Replies:

25065 Feb 17,2005 09:14 AM UTC Feb 17,2005 09:53 AM UTC Windows Forms 1
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 17, 2005 09:14 AM UTC

I''ve a data grid containing 3 records... is it possible for me to drag the 3rd record to be in the first position ?

Administrator [Syncfusion]
Replied On February 17, 2005 09:53 AM UTC

Not really. Moving records in a DataTable is not something that can be done. You can use a DataView and have a specicial column with a special sort order that allows the rows to be displayed in a different order. Here is a KB discussing how you can move rows in such a manner. http://www.syncfusion.com/Support/article.aspx?id=10379 It does it by clicking buttons. If you want to support D&D, then you would have to add that type of interface onto this row moving fucntionality. To get the UI to show moving rows, you can do: this.gridDataBoundGrid1.Model.Options.AllowDragSelectedRows = true; this.gridDataBoundGrid1.Model.RowsMoved += new GridRangeMovedEventHandler(Model_RowsMoved); This will let you user mouse down on a row header to select it, and then mousedown a second time to drag it. In the event handler, Model_RowsMoved, you would need to use the dataview technique to reorder the rows.

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

;