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.
Syncfusion Feedback

Hiding Caption rows when no records

Thread ID:

Created:

Updated:

Platform:

Replies:

70563 Dec 14,2007 10:14 PM UTC Dec 19,2007 01:00 PM UTC Windows Forms 3
loading
Tags: GridControl
Mark Atkinson
Asked On December 14, 2007 10:14 PM UTC

Is there an easy way to hide the header row (the one that typically reads "TableName: 0 Items") of a nested chid table when there are no records?

I'm sure the answer lies somewhere in the forum - excuse me if it's been asked before.


Administrator [Syncfusion]
Replied On December 15, 2007 09:16 AM UTC

First comment is that you can turn off that caption line for all nested tables (whether or not they are empty) by setting:

this.gridGroupingControl1.NestedTableGroupOptions.ShowCaption = false;


Here is a forum thread that discusses how not to display the +/- cell for empty nested tables so your user cannot expand them (and hence the caption line is never visible).
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=53637

If you really want to selectively just hide the caption row, then you would have to use a custom grouping engine which is sort of a big change to your application if you are not already using one for some reason. Here is a thread that has a sample where you can set rowheights to zero but it does require a custom engine.
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=37998



Mark Atkinson
Replied On December 17, 2007 06:32 PM UTC

Well, I need the caption to be turned on if the table has child records.

Using the code snippet with a couple of changes I was able to turn off the +/- in the puchbutton cell, but that didn't get rid of the entire caption row alltogether (which is what I want).
I'll keep playing with the code though..

>First comment is that you can turn off that caption line for all nested tables (whether or not they are empty) by setting:

this.gridGroupingControl1.NestedTableGroupOptions.ShowCaption = false;


Here is a forum thread that discusses how not to display the +/- cell for empty nested tables so your user cannot expand them (and hence the caption line is never visible).
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=53637

If you really want to selectively just hide the caption row, then you would have to use a custom grouping engine which is sort of a big change to your application if you are not already using one for some reason. Here is a thread that has a sample where you can set rowheights to zero but it does require a custom engine.
http://www.syncfusion.com/Support/Forums/message.aspx?&MessageID=37998





Administrator [Syncfusion]
Replied On December 19, 2007 01:00 PM UTC

Here is the sample back modified to use the custom engine technique to hide the CaptionRow for empty child tables by setting its row height to zero.




GGC_PasteSort.zip

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

;