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. Image for the cookie policy date
close icon

Add a new row to grid with empty datasource

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.

4 Replies

HA haneefm Syncfusion Team May 18, 2007 10:34 PM UTC

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


CH Chinedu May 20, 2007 11:19 PM UTC

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


HA haneefm Syncfusion Team May 21, 2007 07:01 PM UTC

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


CH Chinedu May 21, 2007 09:07 PM UTC

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

Thanks a million...

Loader.
Live Chat Icon For mobile
Up arrow icon