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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Bound grid not adding new

Thread ID:





70854 Jan 4,2008 04:02 PM UTC Jan 8,2008 10:17 AM UTC WinForms 1
Tags: GridControl
Asked On January 4, 2008 04:02 PM UTC

Hopefully this is something really simple but as I'm new to Syncfusion its got me stumped. I'm creating a relatively simple form that hosts the DataBoundGrid. At runtime a ListArray is populated and then bound to the grid and a series of GridBoundColumns are specified. Everything works great except ... I can't add new records. I have the AddNew property set to true.

I tried replacing the ListArray with a DataTable and no GridBoundColumns and it works (this suggests to me I have the basic properties of the grid set correctly). I applied the GridBoundColumns and it stopped working. So thinking it was something to do with the GridBoundColumns I reinstated the ListArray but this time without the GridBoundColumns. No luck.

All the Syncfusion examples I've looked at so far have a datatable imbedded in the solution and bound at design time.

So, is it possible to have AddNew functioning on a DataBoundGrid with GridBoundColumns that has been bound to a ListArray at runtime?

(I'm using Essential Studio, VS2005 C#, Win XP Prof)

Regards PLST

SubhaSheela R [Syncfusion]
Replied On January 8, 2008 10:17 AM UTC

Hi Peter,

Thank you for using Syncfusion products.

You cannot add new items directly to the ArrayList through the grid. But you can add new items to ArrayList by implementing IBindingList interface since AddNew method is available only in that interface. Implementation of IBindingList.AddNew as well as the IBindingList.AllowNew property will let you to add new rows.

Please refer to the simple sample available in the below link that illustrates the same:

http://websamples.syncfusion.com//samples/ Grid.Windows//F70854/main.htm

For more details, you can refer our online documentation or the local documentation available in the dashboard under the category:
Essential Grid---->Grid Control---->Basic concepts ---->GridDataBoundGrid Use Cases---->Binding to an ArrayList---->ArrayList Class with IBindingList Support

Kindly let me know if you have any questions.

Subhasheela R


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon