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

Moving Columns in 3.0.1

Only noticed this problem just today. I updated from 2.1.0.9 to 3.0.1 and now I am no longer able to move columns around in the GridDataBoundGrid. This worked just fine in the previous version, but no longer does. I can still double-click the column header to sort, but this used to also select the column, which it no longer does. I checked to see if the "AllowDragSelectedCols" is set to true and it is, so I''m not really sure why I can''t do this anymore. Thanks, Akshay

10 Replies

AD Administrator Syncfusion Team January 5, 2005 12:38 PM

Do you have ListBoxSelectionMode set? If so, this will prevent columns from being selected, and this in turn will prevent the user from dragging columns. Here is a thread with one work-around for this problem. http://64.78.18.34/Support/Forums/message.aspx?MessageID=12055 One other thing to check is to make sure grid.AllowSelections includes the columns flag.


AA Akshay Arora January 5, 2005 01:30 PM

>Do you have ListBoxSelectionMode set? Nope. It''s set to ''None'', which I believe is the default. >One other thing to check is to make sure grid.AllowSelections includes the columns flag. Also the default of ''Any'' Keep in mind this all worked just fine before upgrading to 3.0.1, so I think there is some default behavious that has changed. This will be somewhat problematic because I don''t want to have to go through every winform to fix this... I checked the link you stated, but that was more linked to someone using ListBoxSelectionMode than a default set up.


AD Administrator Syncfusion Team January 5, 2005 02:22 PM

I dragged a GridDataBoundGrid onto a form and set its datasource using 3.0.1.0. The dragging seems to work as expected for me. Here is the sample. Does this work for you? http://www.syncfusion.com/forums/Uploads/GDBG_MoveCols.zip Can you modify it to show the problem.


AA Akshay Arora January 6, 2005 05:30 AM

I figured out the problem. I have EnableEdit = false for the grid as I don''t want the user to edit the contents of the cell. They are still allowed to move the columns around. This used to work, but no longer does...


AD Administrator Syncfusion Team January 6, 2005 06:12 AM

There might be another property setting that is influencing this behavior. Just setting this.gridDataBoundGrid1.EnableEdit = false; at the bottom of the Form.Load in the sample above does not break the column moving for me. If you are setting Enabled = false in some way, then that probably would break this as you would then no longer be able to click the header to select the column.


AA Akshay Arora January 6, 2005 06:52 AM

Below is what I did to your example to cause this: 1. Enclose it within a GridRecordNavigationControl 2. ExcelLikeCurrentCell = true 3. ExcelLikeSelectionFrame = true 4. ActivateCurrentCellBehavior = DblClickOnCell 5. EnableEdit = false I tried switching each true/false combo to see it will change things and here is what I found. If both EnableEdit = false AND ExcelListCurrentCell = true, then this behaviour is found, otherwise it works like normal...


AD Administrator Syncfusion Team January 6, 2005 09:03 AM

Thank you. I can see the problem. It is the ExcelLikeCurrentCell that is preventing the selection of columns which prevents the move from taking place. The EnableEdit does not seem to play a role for me. I will forward this to the grid architect so we can get it fixed.


AA Akshay Arora January 6, 2005 09:06 AM

>Thank you. I can see the problem. It is the ExcelLikeCurrentCell that is preventing the selection of columns which prevents the move from taking place. The EnableEdit does not seem to play a role for me. I will forward this to the grid architect so we can get it fixed. > > Thanks. Let me know when you''ve got a work around. Should I open something in Direct-Trac so I can keep track of it easier?


AD Administrator Syncfusion Team January 6, 2005 10:14 AM

Setting this property avoids the problem for me. this.gridDataBoundGrid1.Model.Options.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.DeactivateCurrentCell;


AA Akshay Arora January 10, 2005 11:56 AM

>Setting this property avoids the problem for me. > >this.gridDataBoundGrid1.Model.Options.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.DeactivateCurrentCell; > That indeed works and I guess it''s what I will have to do. My largest concern is that why did anything have to change? Thanks for the help though. I will addthis line of code where needed. -Akshay >Setting this property avoids the problem for me. > >this.gridDataBoundGrid1.Model.Options.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.DeactivateCurrentCell; >

Loader.
Live Chat Icon For mobile
Up arrow icon