I am trying to prevent certain column moving within a group when using "Row layout within groups". I have turned on within group only which prevents me moving the columns outside of their group, good. However, there is no option to prevent the moving of a column to a different vertical position within that group, but allow moving it horizontal. See below for what I mean.
I have tried controlling it with the following code, but it only prevents me dropping the column below but not above...
Private Sub ugrStaffing_BeforeColPosChanged(sender As Object, e As BeforeColPosChangedEventArgs) Handles ugrStaffing.BeforeColPosChanged
If e.PosChanged = PosChanged.Moved Then
If e.ColumnHeaders(0).Column.RowLayoutColumnInfo.OriginY > 0 Or e.ColumnHeaders(0).Column.RowLayoutColumnInfo.OriginY < 0 Then
e.Cancel = True
End If
End Sub
Thanks,
Alex
Hello,
You should set AllowRowLayoutColMoving to AllowOriginXChange
e.Layout.Override.AllowRowLayoutColMoving = Infragistics.Win.Layout.GridBagLayoutAllowMoving.AllowOriginXChange;
Please let me know if you have any further questions.