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 & move columns in dataBoundGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

13255 Apr 23,2004 11:06 AM Apr 24,2004 02:24 AM Windows Forms 5
loading
Tags: GridControl
Vincent Lo
Asked On April 23, 2004 11:06 AM

are there any events catching drag and move columns? I am planning to move columns by catching the ColIndex, converting it to mappingName and then re-arrange the LayoutColumns string[]. However, I can''t manage to find some that is similar to dragdrop?

Administrator [Syncfusion]
Replied On April 23, 2004 11:32 AM

Moving columns is support by default in a GridDataBoundGrid. If you click a colheader to select the column, then if you mousedown on the selected column header, you can drag and drop it in another position. If you do not see this behavior, check the AllowDragSelectedCols property to make sure it is on. Another reason you might not see this default behavior is if you have ListBoxSelectionMode set to something other than none. With ListBoxSelectionMode set, the default behavior is to not allow selecting columns (since you can only select rows). Here is a forum thread with a work around. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=12055

Vincent Lo
Replied On April 23, 2004 01:04 PM

Thanks for advice... i have re-enable the selection to "Cell, Column" and now it works. However, I have got 2 hierarchies of table with identical columns. I want columns in both tables to move to the same position. Is there any property i can set or what code i can use to move the respective columns?

Administrator [Syncfusion]
Replied On April 23, 2004 05:45 PM

There are no property settings that support moving child row headers in a hierarchical GridDataBoundGrid. (You can do this in a GridGroupingControl). If you want to implement this behavior in a GridDataBoundGrid, you will have to design/implement this yourself. Here is a link to a forum thread that has a sample that lets you move a column by just mousing down on it (not having to select it first). Maybe you can use something similar to implement your requirements. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=9676

Vincent Lo
Replied On April 24, 2004 02:10 AM

How can i access the moveRange property for my child table in the lower hierarchy? when i do gridDataBoundGrid1.Model.Cols.MoveRange(3,1,1) I can move the parent table but could you advise if there''s something similar i can code to instruct the child table to move?

Vincent Lo
Replied On April 24, 2004 02:24 AM

I have achieved it by reading in the names of the internal columns after col moving and using LayoutColumns to assign it to columns in my child table. Any better suggestions?? >How can i access the moveRange property for my child table in the lower hierarchy? > >when i do >gridDataBoundGrid1.Model.Cols.MoveRange(3,1,1) >I can move the parent table but could you advise if there''s something similar i can code to instruct the child table to move?

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

;