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
690
Change Field Layout at run-time
posted

I am loading a grid with 16 columns. But before i print the grid i want to change the fieldlayout so that there are 8 columns on first row and remaining 8 cols in second row.

eg:

col1 col2 ..... col8
col9 col10 col11...... col16

I am trying to achieve this by changing FieldLayout but i am unable to do so.

I have tried creating a new fieldlayout and changing Fields[].Row and Column value as per my need with proper span and adding the new layout to  XamDataGrid.FieldLayouts.Add(new_layout) and then making the layout default i.e. XamDataGrid.DefaultFieldLayout=XamDataGrid.FieldLayouts[1];

I even tried changing XamDataGrid.DefaultFieldLayout directly but nothing worked for me.

Can anyone pls let me know what my problem is??

Thanks
miztaken