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
490
Can't set the DataSource on a DataPresenter that has items added explicitly through the DataItems collection.
posted

Can't set the DataSource on a DataPresenter that has items added explicitly through the DataItems collection.

 I am getting the above error.

I am binding my collection to the DataContext = EntityCollection<myEntityClass>

We are in the process of evaluating the xamgrid.

I am getting the above error for the following error. Any help is much appreciated.

thanks

vairam

<my:XamDataGrid Height="103" Margin="12,25,92,0" Name="xamDataGrid1" VerticalAlignment="Top" DataSource="{Binding}">

<my:FieldLayout>

<my:FieldLayout.FieldSettings>

<my:FieldSettings CellClickAction="SelectRecord"/>

</my:FieldLayout.FieldSettings>

<my:FieldLayout.Fields>

<my:Field Name="appdesc" />

<my:Field Name="appdesccode"/>

</my:FieldLayout.Fields>

</my:FieldLayout>

</my:XamDataGrid>

 

Parents
No Data
Reply
  • 490
    posted

    the following worked, But, it was giving lot of trouble with Binding. It is very buggy that it was constant giving error that Binding is not found in namespace "...presentation". However, worked when I commenting out all of it & having only the first line <my:XamDataGrid ../> alone & uncommenting each block startinging from FieldLayoutSettings worked. why it is unstable that the same code wouldn't compile on one instance & not the other, something to do with wpf 3.0?

    thanks

    vairam

     

    <my:XamDataGrid Height="103" Margin="12,25,92,0" Name="xamDataGrid1" VerticalAlignment="Top" DataSource="{Binding Path=.}">

    <my:XamDataGrid.FieldLayoutSettings>

    <my:FieldLayoutSettings x:Uid="my:FieldLayoutSettings_1" AutoArrangeCells="Never" AutoGenerateFields="False" />

    </my:XamDataGrid.FieldLayoutSettings>

    <my:XamDataGrid.FieldLayouts>

    <my:FieldLayout x:Uid="my:FieldLayout_1">

    <my:FieldLayout.Fields>

    <my:Field Name="appdesc" />

    <my:Field Name="appdesccode"/>

    </my:FieldLayout.Fields>

    </my:FieldLayout>

    </my:XamDataGrid.FieldLayouts>

    </my:XamDataGrid>

Children