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
95
Re-Arranging XamDataGrid headers on the fly.
posted

I am trying to save off a XamDataGrid's header re-arrangement in 8.2.  I like how the user can now stack columns and the grid responds accordingly with drag and drop (Too sweet!!!).  I can also see they can be arranged from xaml by setting Row and Column.  This doesn't appear to work from code behind:

LabelPresenter dlp = (LabelPresenter)_xamDataGrid.labelPresenterSource;

 

Field field = dlp.Field.Owner.Fields[1];

field.Row = 1;

I would expect my column to drop to the 2nd row.

I can see in the debugger that when I drag and drop a column header down a row, the Field.FieldGridPosition.Row private variable changes correctly, but the Field.Row variable does not change.  Setting Field.Row does not change Field.FieldGridPosition.Row either.

-tia

Kurt