Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
420
Moving Columns Error
posted

I have a grid with about 14 columns in which I programmatically added a group and added columns to that group.

The grid is set to allow column moving.

If I load the form and move a column that is not in the group, it works.

If I move a column from the group it throws an internal Infragistics error. If I try to move a column that is not in the group after I get the error it too now throws an internal iIfragistics error.

I tried to fix this by hooking into the BeforeColPositionchanged event and cancelling if the column header was a column from the group. No luck there either.

Any ideas?

b.GroupHeadersVisible = true;
b.RowLayoutStyle = RowLayoutStyle.GroupLayout;
b.Override.AllowColMoving = AllowColMoving.NotAllowed;
UltraGridGroup setGrp = b.Groups.Add("Settlement", "Settlement Options");
setGrp.Header.Appearance.FontData.Bold = DefaultableBoolean.True;
setGrp.Header.Appearance.FontData.Underline = DefaultableBoolean.True;
setGrp.Header.Appearance.TextHAlign = HAlign.Center;
setGrp.RowLayoutGroupInfo.OriginX = 500;
setGrp.CellAppearance.BorderColor = Color.LightGreen;
b.Columns[AMT].RowLayoutColumnInfo.ParentGroup = setGrp;
b.Columns[EXCH].RowLayoutColumnInfo.ParentGroup = setGrp;
b.Columns[CUR].RowLayoutColumnInfo.ParentGroup = setGrp;

  • 34810
    Offline posted

    Hello William,

    I have been investigating into the behavior you are seeing, and using the code that you have provided in your original post, I am unable to actually move any columns in the UltraGrid. This is not surprising, though, as the inclusion of the following line will not allow column movement:

    b.Override.AllowColMoving = AllowColMoving.NotAllowed;

    As such, I cannot move any columns in this grid, and so I am unsure why you are able to in your application if this code is being used. I am attaching the sample project I used to test this. It will be helpful if you can modify it such that it reproduces the behavior you are seeing and send it back. Alternatively, if you have an isolated sample of your own that reproduces this issue, can you please provide that?

    Please let me know if you have any other questions or concerns on this matter.

    UltraGridColumnMovingTest.zip