Drag Columns Header GGC

Hi together,

I have got a GridGroupingControl which is bound to a dataset (with multiple tables). Now I want to enable the option to drag a column header with the mouse and move it to another position (so swaping the columns). How can I enable this in a gridgrouping control?

5 Replies

AD Administrator Syncfusion Team July 20, 2006 08:06 AM UTC

I forgot to add a sample. I found this GGC sample with multiple tables here in the forum - so I hope it''s ok to use it for my problem.

The gridgrouping control is bound to a dataset with 4 tables. I want to set the option:

GridTable actTable = gridGroupingControl1.GetTable(actDef.ToString());
actTable.TableOptions.AllowDragColumns = true;
actTable.TableOptions.AllowSortColumns = false;

for each table. But I am not able to switch the columns. Any ideas?

GGC_4tables0.zip


AD Administrator Syncfusion Team July 20, 2006 10:57 AM UTC

Hi Torsten,

There are some new features added to the grouping engine, for the implementation of strong-typed nested collections support with RelationKind.UniformChildList relation. Please refer to the link below for more information on this. In the link below check for Essential Grouping, to know about the new features added.

http://www2.syncfusion.com/Installs/v4.2.0.27/WindowsForms/Release%20Notes.htm

In the latest version, there has been a bug report filed on "With the UniformChildList relation kind; an update to the list of children is not reflected".

http://www.syncfusion.com/support/issues/grid/Default.aspx?ToDo=view&questId=2334

To get this working properly as desired, please set the below piece of code.
this.gridGroupingControl1.Engine.UseOldUniformChildListRelation = true;

The new design is implemented such that it is backward compatible. By setting the Engine.UseOldUniformChildListRelation to true, you can get the old behavior.

Thanks,
Rajagopal


AD Administrator Syncfusion Team July 20, 2006 12:57 PM UTC

Hmm,

I don''t really understand if this new feature helps me with my problem? I want to switch columns (from my nested tables) with the mouse?

Cheers,
Torsten


AD Administrator Syncfusion Team July 20, 2006 01:35 PM UTC

Hi Torsten,

Please check the modified sample attached that works fine. To move columns by clicking on the column header, you need to select the column and then mouse down on the selected column header and then drag them.

Here is the modified sample
http://www.syncfusion.com/Support/user/uploads/GGC_4tables1_69b5a46e.zip

Let me know if you need any further assistance.
Thanks,
Rajagopal


AD Administrator Syncfusion Team July 20, 2006 02:26 PM UTC

Ahh,

it works! Thank you very much. Now I understand your previous post.

Loader.
Up arrow icon