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
1945
Data Virtualization and xamDataGrid
posted

Hi

I've implemented data virtualization technique from http://bea.stollnitz.com/blog/?p=411 sucessfully however binding the actual data in the datagrid is giving me problems. The actual data is wrapped in a data wrapper exposed as the Data property which i've tried binding in the DataGrid field but it doesn't work.

So far i've done:

Codebehind:

myDataGrid.DataContext =  new AsyncVirtualizingCollection<Partner>(partnerProvider, 100, 5000);

xaml:

<igDP:XamDataGrid x:Name="myDataGrid" DataSource="{Binding}">
 <igDP:XamDataGrid.FieldLayouts>
  <igDP:FieldLayout>
   <igDP:FieldLayout.Fields>
    <igDP:Field Name="{Binding Data.Name1}"/>
   </igDP:FieldLayout.Fields>
  </igDP:FieldLayout>
 </igDP:XamDataGrid.FieldLayouts>
</igDP:XamDataGrid>

What am i doing wrong?

Parents
No Data
Reply
  • 69686
    posted

    Hello,

    From the code snippet that you have provided, you are defining the layout incorrectly. The Name of the field cannot be bound. It must match the name of the name of a public property from the data source.

    You can see more information on how to Define Layouts Manually and how to use Unbound Fields if you need to bind to a complex property. FieldLayout overview you can find here.

Children