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
1865
Field ordering od Active layout
posted

I am copying xamDataGrid's data to excel. I am doing it field by field. In order to do so, I have the following loop:

 

foreach (Field field in xamDataGrid.DefaultFieldLayout.Fields)

{

....

}

However, the ordering of the fields in xamDataGrid.DefaultFieldLayout.Fields is different from what is visible in the grid. Is there a way to ensure that the fields are copied to excel in the same order as the currently active layout. I guess, something like:

foreach (Field field in xamDataGrid.CurrentFieldLayout.Fields) ..... so, if the user has moved some fields around, the new field ordering is used.

 

Thanks.