I bind my grid to an EF4.1 object
public ObservableCollection<InventoryItem> InventoryItems { get { if (!_loadComplete) return null; return _data.InventoryItems.Local; } }
- The load happens on a task thread
Task.Factory.StartNew(Load);
My problem is that if I turn off AutoGenerateFields, the all I ever see is the row selectors, never any column data.
If I set AutoGenerateFields=True then it works as expected.
<igDP:XamDataGrid Style="{StaticResource fadeIn}" Opacity="0" Name="grid" Theme="Office2k7Blue" DataSource="{Binding InventoryItems}" BindToSampleData="False" > <igDP:XamDataGrid.ViewSettings> <igDP:GridViewSettings /> </igDP:XamDataGrid.ViewSettings> <igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings AllowRecordFiltering="True" AllowEdit="True" CellClickAction="EnterEditModeIfAllowed" LabelClickAction="SortByMultipleFields" FilterClearButtonVisibility="Visible" LabelTextAlignment="Center" LabelTextTrimming="CharacterEllipsis" LabelTextWrapping="WrapWithOverflow" FilterOperatorDefaultValue="Contains" /> </igDP:XamDataGrid.FieldSettings> <igDP:XamDataGrid.FieldLayoutSettings> <igDP:FieldLayoutSettings AllowAddNew="True" AllowDelete="True" AutoGenerateFields="True" /> </igDP:XamDataGrid.FieldLayoutSettings> <igDP:XamDataGrid.FieldLayouts> <igDP:FieldLayout IsDefault="true"> <igDP:FieldLayout.Fields> <igDP:Field Name="item" Label="Item" Column="0" /> <igDP:Field Name="itmdesc" Label="Name" Visibility="Visible"> <igDP:Field.Settings> <igDP:FieldSettings AllowGroupBy="False" /> </igDP:Field.Settings> </igDP:Field> <igDP:Field Name="supplier" Label="Supplier"/> <igDP:Field Name="stkumid" Label="Units"/> <igDP:Field Name="price" Label="Price" /> <igDP:Field Name="price3" Label="Price3" /> </igDP:FieldLayout.Fields> </igDP:FieldLayout> </igDP:XamDataGrid.FieldLayouts> </igDP:XamDataGrid>
What am I doing wrong?
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
If the above suggestion helped you solve your issue please verify the thread as answered so other users may take better advantage of it.
I have been looking into your issue, however I couldn’t see anything suspicious in your code. The only thing I can think of is that you might have misspelled some of the fields thus preventing your whole layout from applying. You can check this blog post for further reference on FieldLayout assignment: http://blogs.infragistics.com/blogs/petar_monov/archive/2011/05/13/how-to-define-fieldlayouts-how-fieldlyouts-are-mapped.aspx
If this is not the case I would need a test sample to further investigate into your issue.
Looking forward to hearing from you.