We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Grid binding to ObservableCollection

Thread ID:

Created:

Updated:

Platform:

Replies:

105109 Sep 10,2012 02:02 AM Sep 11,2012 08:21 AM Windows Forms 1
loading
Tags: GridControl
Anne
Asked On September 10, 2012 02:02 AM

I'm new to Syncfusion grids. I need some advice which grid to choose and where to start.

Requirements are:
  • There is an ObservableCollection of objects, which shall be displayed in the grid.
  • The grid shall update automatically if the collection of objects changes, or a property of one of the objects in the collection changes.
  • Some columns (properties of objects) shall be editable in the grid. Thus a two-way binding between the grid and the ObservableCollection.
I already tried a GridDataBoundGrid and setting the DataSource to the ObservableCollection. But no columns are shown in the grid. If I manually add an item to the grid's GridBoundColumns collection. this column gets shown, but it doesn't display the object data out of the ObservableCollection.

Please tell me where I should start. I'd appreciate it if all grid settings were made in code, not through the GUI designer.
Thanks a lot!

Arun Kumar V [Syncfusion]
Replied On September 11, 2012 08:21 AM

Hi Annemarie,

Thanks for the update.

By Setting the Griddataboundgrid to observable collection we can achieve the requested behavior.Please give us a sample code So that we could regenerate the code for you.

Regards,
Arun Kumar V

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;