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.

Add a new row to grid with empty datasource

Thread ID:

Created:

Updated:

Platform:

Replies:

61169 May 18,2007 04:52 PM May 21,2007 05:07 PM Windows Forms 4
loading
Tags: GridControl
Chinedu
Asked On May 18, 2007 04:52 PM

How do I add a row to a grid with an empty datasource, and access this added row to change some of its columns rendering, i.e change some to dateTimePickers, ListBoxes etc.

I basically have all these configured on the filterbar, I need another row under the filterbar with same controls.

haneefm [Syncfusion]
Replied On May 18, 2007 06:34 PM

Hi Nedu,

You can add additional custom sections to any group. In your case, you can add that extra section before all add new record sections in the ChildTable.OnInitializeSections method.

Once such an extra section class overrides the GetVisibleCount method and returns a value greater than 0 it will appear as Element in the DisplayElements collection. The DisplayElements collection is in sync with rows in the table.

See this forum thread that deals with a similar issue, and also refer to the sample in \Grid.Grouping.Windows\Samples\CustomSectionInGroup\ to know more about custom section.

Best regards,
Haneef

Chinedu
Replied On May 20, 2007 07:19 PM

Thank you Haneef, In the OnInitializeSections section I added A headerSection, a filterBarSection another headersection and then the last filterbar section.

in the second header section, I want to change the text of three of four of them, the others I want to make look like regular textboxes without any text and disabled so they cannot be activated or edited.

I have attached a zipped word doc showing what I'm gunning for on this grid.



Example25.zip

haneefm [Syncfusion]
Replied On May 21, 2007 03:01 PM

Hi Nedu,

Thanks for your update.

You can try the attached sample that implements the custom grouping engine to add the extra rows in a grid. Please refer this and let me know if this helps.
TwoExtraRowFilterBarUserControANDMonthCalendarl.zip

See KB article that shows you "How do I efficiently customize the child table/group by using a custom engine?".


Best regards,
Haneef

Chinedu
Replied On May 21, 2007 05:07 PM

Thank you so much Haneef, God bless you...I would have been totally lost without your help.

Thanks a million...

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.

;