GridGroupingControl - HierarchyView - Blind out top level
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
SIGN IN To post a reply.
6 Replies
ST
stanleyj
Syncfusion Team
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\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
AD
Administrator
Syncfusion Team
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
ST
stanleyj
Syncfusion Team
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
AD
Administrator
Syncfusion Team
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
demo3.zip
demo3.zip
ST
stanleyj
Syncfusion Team
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
AD
Administrator
Syncfusion Team
January 20, 2006 01:34 PM UTC
Works perfect! - thx, Klaus
SIGN IN To post a reply.
- 6 Replies
- 2 Participants
-
AD Administrator
- Jan 19, 2006 02:36 PM UTC
- Jan 20, 2006 01:34 PM UTC