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.

Bound grid not adding new

Thread ID:

Created:

Updated:

Platform:

Replies:

70854 Jan 4,2008 11:02 AM Jan 8,2008 05:17 AM Windows Forms 1
loading
Tags: GridControl
Peter Trevor NO LONGER WITH COMPANY
Asked On January 4, 2008 11:02 AM

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 5.2.0.25, VS2005 C#, Win XP Prof)

Regards PLST




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

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.

Regards,
Subhasheela R




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.

;