The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I must be missing something here. I have a GridDataBoundGrid class (DocumentGrid) with a class (DocumentList) derived from ArrayList as a data source. DocumentList implements IBindingList. I would now like to programmatically add an existing object (Document)to DocumentList and have it show up in the grid. AddNew does not seem to be the way to go since you can't pass it the Document as a parameter.
Any ideas?
Thanks!
Laurie
ADAdministrator Syncfusion Team August 1, 2003 06:02 AM UTC
> I must be missing something here. I have a GridDataBoundGrid class (DocumentGrid) with a class (DocumentList) derived from ArrayList as a data source. DocumentList implements IBindingList. I would now like to programmatically add an existing object (Document)to DocumentList and have it show up in the grid. AddNew does not seem to be the way to go since you can't pass it the Document as a parameter.
>
> Any ideas?
>
> Thanks!
> Laurie
>
What does your implementation of IBindingList.AddNew do? Normally, it would create a new object of the proper type and add it to the IBindingList.List, firing the proper notification events along the way. You can see a sample implementation in the \Syncfusion\Essential Suite\Grid\Samples\DataBound\Hierarchical\Customers sample.
Once the default new item is in your collection, you could then replace it in your list with your existing object.
ADAdministrator Syncfusion Team August 1, 2003 08:16 AM UTC
You could add a new public AddNew method with a different signature, and pass it the existing object so it can be directly added to your list. This new method should make sure the proper ListChanged event is fired.
Then you could use this method directly from code to add your existing object.