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.

GridGroupingControl - HierarchyView - Blind out top level

Thread ID:

Created:

Updated:

Platform:

Replies:

39852 Jan 19,2006 09:36 AM Jan 20,2006 08:34 AM Windows Forms 6
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On January 19, 2006 09:36 AM

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 06:18 PM

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\4.1.0.10\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 03:59 AM

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 04:39 AM

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 05:42 AM

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

demo3.zip

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

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 08:34 AM

Works perfect! - thx, Klaus

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.

;