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

Add empty records in Griddataboundgrid

Thread ID:

Created:

Updated:

Platform:

Replies:

77783 Nov 17,2008 02:59 PM UTC Dec 5,2008 03:02 PM UTC WinForms 3
loading
Tags: GridControl
Gunther Devisch
Asked On November 17, 2008 02:59 PM UTC

Hello,

I was wondering if it was possible to add empty records to a griddataboundgrid. The purpose is to fill up the empty grid space with empty records, when there is by example one record specified in the grid.

Thanks in advance,

Gunther


Jisha Joy [Syncfusion]
Replied On November 18, 2008 05:30 AM UTC

Hi Gunther,

You do not have to fill in everything. All you have to do is call:



DataRow dr = dt.NewRow();
dt.Rows.Add(dr);





That is it. That adds any empty row. You are free to populate whatever field you want to populate, 1 field, 2 fields, all fields or no fields.



If your datasource is not a datatable, then you still do the same thing. You create a new item for your IBindingList collection, and then you add it to the collection.



So, the question is: Can you add a new item to the datasource and populate what you want populated? This has nothing to do with the grid, it is all about the nature of your datasource.

Thank you for using Syncfusion products.

Regards,
Jisha



Gunther Devisch
Replied On November 18, 2008 11:59 AM UTC

Hey Jisha,

Indeed, stupid of me! I wasn't thinking so far.

Thanks for the solution!

Gunther


Administrator [Syncfusion]
Replied On December 5, 2008 03:02 PM UTC

Hey,

I was wondering if there is property for filling up the griddataboundgrid with empty records, because with i'm having problems adding empty datarows to the datatable, duo to my rowfilter i think.

Thanks,
Gunther

>Hey Jisha,

Indeed, stupid of me! I wasn't thinking so far.

Thanks for the solution!

Gunther




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.

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

;