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
AD
Administrator
Syncfusion Team
January 5, 2005 05:38 PM UTC
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 06:30 PM UTC
>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 07:22 PM UTC
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 10:30 AM UTC
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 11:12 AM UTC
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 11:52 AM UTC
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 02:03 PM UTC
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 02:06 PM UTC
>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 03:14 PM UTC
Setting this property avoids the problem for me.
this.gridDataBoundGrid1.Model.Options.ClickedOnDisabledCellBehavior = GridClickedOnDisabledCellBehavior.DeactivateCurrentCell;
AA
Akshay Arora
January 10, 2005 04:56 PM UTC
>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;
>