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

Allowing frozen column to be grouped but not moved - how to let a Detail do the same thing

Thread ID:

Created:

Updated:

Platform:

Replies:

96997 Oct 19,2010 03:45 PM UTC Oct 20,2010 07:34 PM UTC Windows Forms 1
loading
Tags: GridControl
David Mecteaux
Asked On October 19, 2010 03:45 PM UTC

Hello,

I have this method which allows a frozen column to be grouped and it also prevents it from being to a different column location:

public void AllowFrozenColumnsToBeGrouped(string FrozenColumnName, int numberAddedColumns)
{
FrozenColumnGroupingName = FrozenColumnName;
FrozenColumnsCanBeGrouped = true;
int field = this.TableDescriptor.NameToField(FrozenColumnName);
//field = this.TableDescriptor.FieldToColIndex(field); // if syncfusion fixes the problem use this line of code and erase the one below this line
field = this.TableDescriptor.FieldToColIndex(field) - numberAddedColumns; // the - here manually fixes a syncfusion bug
this.TableModel.Cols.FreezeRange(1, field);
this.PropertyChanged +=
new Syncfusion.Grouping.DescriptorPropertyChangedEventHandler(grd_PropertyChanged);
this.TableControlQueryAllowDragColumn +=
new Syncfusion.Windows.Forms.Grid.Grouping.GridQueryAllowDragColumnEventHandler(grd_TableControlQueryAllowDragColumn);
}


This works great. But now I am wondering could I do the same thing for Detail tables? If so how could I do this?

Also there might be a bug with the Grid. If you manually move a column around in code and then run this method this line of code returns the wrong column number:
field = this.TableDescriptor.FieldToColIndex(field);




David Mecteaux
Replied On October 20, 2010 07:34 PM UTC

FYI...I needed to turn this into a incident. It is incident: 73399


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

;