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

Hide empty nested table on a GDC

Hallo,

I have a some problems to hide empty nested tables in a GDC.

I have a GDC which i fill with a DataSet, which have 4 tables and 3 relations. Its work like a treeNode and it looks fine.
The first table contains the "root", as some kind of parent item, and the following tables the childs.
Each relation is like a treeNode, so the first table have a relation to the second and the second to the third table and so on.

But now i have the problem, that rows, which have no children, show empty tables.
I tryed a lot, to solve this problem... codesnipes like:

public class GroupingChildTable : GridChildTable, IGridGroupOptionsSource
{
public GroupingChildTable(Syncfusion.Grouping.Element parent)
: base(parent)
{ }
public override int GetVisibleCount()
{
if (this.Details == null || this.Records.Count == 0)
return 0;
return base.GetVisibleCount();
}
}

But there i get a error, and he cant finde my Namespeace anymore. God knows why?

I also tryed to set the CellType on "static", but dindt realy find a beginning... just:

GDC.VisibleColums[0].ColumnStyle.CellType

But there i cant set the type on "static". And i dont wont to set the hole column on "static" just a single cell or row.

looking forward to get some help.

zigZag



1 Reply

RA Rajasekar Syncfusion Team February 23, 2012 09:31 AM UTC

HI ZigZag,

Thanks for choosing Syncfusion products.

You can achieve your requirement by setting HideEmptyChildGrid property as True in the GridDataControl. This is working fine for the Collection of objects however we are able to find that, this property does not work while binding DataTable to the GridDataControl. We have fixed this issue internally and we request you to create an Incident in our Direct Trac Support System by using the below link to get patch for this fix.

https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents

Please let us know if you have any queries.

Thanks,
Rajasekar



Loader.
Live Chat Icon For mobile
Up arrow icon