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
160
Create a fieldLayout in code behind
posted

Can anyone show me a quick example of creating a new fieldLayout in C# in the code behind?

I've tried something like this, but it doesn't seem to properly apply the fieldLayout I've created.

            this.xamDataGrid.DataSource = GetData().DefaultView; 

            Field field = new Field();
            field.Name = "Column1";

            FieldLayout fieldLayout = new FieldLayout();              
            fieldLayout.Fields.Add(field);

            this.xamDataGrid.FieldLayouts.Add(fieldLayout);

            this.xamDataGrid.DefaultFieldLayout = fieldLayout;

 
Thanks for any help.

Gabe
 

Parents Reply Children
No Data