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
405
I have the Field Layout created but how to add records?
posted

I have created the fieldLayout.  But when I use the Grid1.DataItems.Add() that doesn't seem to work with the fieldLayout that I created.  How then do I add records?

 

Parents Reply
  • 69686
    posted in reply to Mark

    You can bind the XamDataGrid in two ways - through the DataSource property or through the DataItems collection. They are mutually exclusive so you should use only one of those at a time. It is recommended to set the DataSource property to a collection and work with it, because you have greater control over the collection and its type - for example - BindingList<T>, ObservableCollection<T>, ListCollectionView, etc.

    You can also see a nice trick to get the xaml definition of the Fieldlayout without manually creating it here.

    Moreover, you can see examples of basic as well as more advanced functionalities of the XamdataGrid (binding to different data sources is also included) in the XamFeatureBrowser from the local samples.

Children