Is it possible ot have a column not allowed to be moved, but the rest of the columns are moveable?
Example
e.Layout.Bands[0].Columns[0].Layout.Override.AllowColMoving =
Infragistics.Win.UltraWinGrid.AllowColMoving.NotAllowed;
When I use this code, no columns in the table are moveable.
If this is not possible, is there any other way to "lock" a column.
What you are describing doesn't really make sense. If you can move one column, then you could theoretically move that column to the left of the immovable column - which then moves the immovable column. So there's really no logical way to do this, unless you mean you want to lock a column all the way to the left and not allow any columns to be moved to the left of it.
You might want to look into using Fixed Columns. You could also handle the BeforeColPosChanged event and cancel the change if the user tried to move a column to a position you don't want to allow.
It makes lots of sense to me. I have more than one Fixed column, and more than one non-fixed column. I want to keep the Fixed columns in a specific order on the left of the grid, while allowing the user to reorder the remaining columns. The "Fixed" property keeps the columns from scrolling, but it doesn't prevent the user from manually grabbing the fixed column's header and moving it to another location.
Hm, that's a good point. But for this to work, you would not only have to prevent the column itself from being moved, you would also have to somehow indicate that dropping any other column to the left of that column is also not allowed. I don't beleive there is any way to do this currently, except handling the BeforeColPosChanged. But of course that's not really ideal since it's not clear to the user that they can't drop the column there until after they release it.
You should Submit a feature request to Infragistic.
We have 2 bands in the UltraWinGrid, with same columns , when user moves the columns in the parent form we I would like to move the columns in the child band also how can this be done?
You could trap the AfterColPosChanged event and then modify the VisiblePosition of the columns in the other bands so they match the band being altered.
Mike,
I have the exact same to have a second band of data's columns mimic the sizing swapping etc. of another band. Would it be possible for you to include a brief generic example of the code that would be in your AfterColPosChanged event handler? Assuming that the grid had 2 bands of data (Band1 and Band2) each with just 3 columns (Col1, Col2, and Col3)? I'd greatly apprecaite it.
Steve
I was able to get this working. I found another post with example code, so you do not need to provide code in case you were going to.
Thanks,
Hi Steve,
Oh, great. I hadn't had a chance to whip up a sample, yet. :)