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

GridGroupingControl - HierarchyView - Blind out top level

Thread ID:





39852 Jan 19,2006 02:36 PM UTC Jan 20,2006 01:34 PM UTC WinForms 6
Tags: GridControl
Administrator [Syncfusion]
Asked On January 19, 2006 02:36 PM UTC

Hi, I have a gridGroupingControl that shows a hierarchy view with 5 levels. Sometimes when the user decides to work only on level 3 to 5 it would be nice to blind out the top level and level 2. (But later blind in again) In combination with some row filters that would improve clearness of the GUI. The easiest way to blind out the top level and level 2 is to re-assign the datasource property with the table of level 3. But then all previous expanded nodes and other modifications of the user are lost because the gridGroupingControl initiates new. Is there a better way to blind out and later blind in the top level of a gridGroupingControl but still see the nested tables? Some help would be nice! Klaus

stanleyj [Syncfusion]
Replied On January 19, 2006 11:18 PM UTC

Hi Klaus, Other way of doing is to hide the parent table records and show the nested table alone. You need to have a custom engine that supports saving row heights. The custom engine allows resizing of rows independent, to know more on that refer the sample in :\Program Files\Syncfusion\Essential Studio\\windows\Grid.Grouping.Windows\Samples\ResizableRows(also available in earlier versions). With this possibility, the parent table records'' row heights are set to zero. Here is a rough try. Best regards, Stanley

Administrator [Syncfusion]
Replied On January 20, 2006 08:59 AM UTC

Hi Stanley, thank you for your advice. Your sample works well, but leads me to the next problem to control the rowHeader different for top level and nested tables. Because when i press "blind" button in your sample it would be nice not to see the indenting of the parent (not visible) tables. this.gridGroupingControl1.TableOptions.ShowRowHeader = false; this.gridGroupingControl1.TableOptions.ShowTableIndent = false; Not to show rowHeader and tableIndent is easy but how can I do this only for the parent table and stil show rowHeader for nested tables? Greetings, Klaus

stanleyj [Syncfusion]
Replied On January 20, 2006 09:39 AM UTC

Hi Klaus, Turning ShowRowHeader to true when blinding will show rowHeader for nested tables, am I right? Regards, Stanley

Administrator [Syncfusion]
Replied On January 20, 2006 10:42 AM UTC

Hi Stanley, yes - you are right rowHeader become visible! But unfortunately also the intentation for parent tables rowHeaders are still calculated. (see picture) Maybe it is possible to control the RowHeaderWidth for parent and nested tables seperat like you did it in the sample for the rowHeight. But I am not so familiar with the framework to apply this in endless time ;-) Or is there an other way? Regards, Klaus >Hi Klaus, > >Turning ShowRowHeader to true when blinding will show rowHeader for nested tables, am I right? > >Regards, >Stanley


stanleyj [Syncfusion]
Replied On January 20, 2006 11:22 AM UTC

Hi Klaus, Instead of setting ShowTableIndent property to false, you can also handle the TableModel.QueryColWidth event to get the same behavior every time. // this.gridGroupingControl1.TableOptions.ShowTableIndent = false; this.gridGroupingControl1.TableModel.QueryColWidth += new GridRowColSizeEventHandler(TableModel_QueryColWidth); this.gridGroupingControl1.GetTableModel("ChildTable").QueryColWidth += new GridRowColSizeEventHandler(TableModel_QueryColWidth); Raise TableModel.QueryColWidth for all tables and check if the index is less than indent column count and set size to zero. private void TableModel_QueryColWidth(object sender, GridRowColSizeEventArgs e) { GridTableModel gridModel = sender as GridTableModel; GridTableControl grid = (GridTableControl) gridModel.ActiveGridView; if(e.Index < gridModel.GetColumnIndentCount()) e.Size = 0; e.Handled = true; } Best regards, Stanley

Administrator [Syncfusion]
Replied On January 20, 2006 01:34 PM UTC

Works perfect! - thx, Klaus


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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