hi
i have a XamDataGrid, whose FieldLayout i have to set in code behind.
the Layout has came from some other objects as property.
like
{
grid.FieldLayouts.Add(newLayout);
grid.DefaultFieldLayout = newLayout;
grid.FieldLayouts.Remove(oldLayout);
}
SetGridLayout(
this.DetailGrid, dlg.UnSelectedFieldLayout);
Hello,
Could you please point out where the problem is?
hi Alex,
i got error on line
grid.FieldLayouts.Add(newLayout); in above code of piece from Method
SetGridLayout(....)
thanx
Laki
Alex,
thanks for reply.
one thing i notice after loading customisation i try to see the value of FieldLayout in
xamDataGrid2_AssigningFieldLayoutToItem(...)
it's field=0 ;
below is the code i used
myClickEvent {
using
(FileStream fs = new FileStream("xamDataGridLayout1.xml", FileMode.Open, FileAccess.Read))
this.xamDataGrid2.LoadCustomizations(fs);
xamDataGrid2.DataSource = people;
e)
regards,
Laki,
I am working on that. I am not sure about the reason why that it is not working.
i didn't any update on last reply from "rvaid".
The solution you provided does not work for me. What am I missing? Please see the attached sample zip (original your zip) with my modified code.
Thanks for the additional information and clearing that up. In this case, I would recommend using the Save and LoadCustomizations method of the XamDataGrid.
Please follow this link on more information about these methods in our help(Save, Load) or in the Andrew Flick blog post:
http://forums.infragistics.com/wpf/codesamples/archives/79116.aspx
Let me know if you have any questions on this.