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
Good article. Thanks Josh.
Indeed it is more complicated, but also flexible than I orginally thought.
Working with FieldLayouts is more complicated than that. I suggest you read the documentation which provides an overview of the topic to better understand how the grid uses them.
http://help.infragistics.com/Help/NetAdvantage/WPF/2007.1/CLR3.X/HTML/xamData_Terms_Fields_Field_Layout.html