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
380
Missing Columns with EF4.1 and DBSet<>
posted

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?

Parents
No Data
Reply
  • 27093
    posted

    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.

Children
No Data