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 : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Parent grid with multiple child grids

Thread ID:

Created:

Updated:

Platform:

Replies:

10440 Feb 2,2004 05:42 PM UTC Feb 3,2004 02:54 AM UTC WinForms 2
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On February 2, 2004 05:42 PM UTC

Hi, I am using a GridHierDataBoundGrid. I have two child grids that need to drop down from this grid. How can I specify this in code? Right now I am only able to see one dropdown arrow for one of the children grids - I need to see a dropdown for both. Thanks! Chuck

Administrator [Syncfusion]
Replied On February 2, 2004 11:03 PM UTC

You can show 2 buttons in the cell where you now have one. You can do it by: 1) adding code in the renderer''s Constructor to add another button. public DropDownGridCellRenderer(GridControlBase grid, GridCellModelBase cellModel) : base(grid, cellModel) { this.DisableTextBox = true; DropDownButton = new GridCellComboBoxButton(this); this.AddButton(new GridCellComboBoxButton(this)); this.dbgrid = null; } 2) set the button bar size in the model''s constructor. public DBDropDownGridCellModel(GridModel grid) : base(grid) { ButtonBarSize = new Size(2 * 20, 20); } 3) Add a OnButtonClicked override to catch the click on either button. A this point, you would have to decide which child grid you want to see, and implement some way to show it. protected override void OnButtonClicked(int rowIndex, int colIndex, int button) { MessageBox.Show(button.ToString() + " clicked"); //base.OnButtonClicked (rowIndex, colIndex, button); }

Administrator [Syncfusion]
Replied On February 3, 2004 02:54 AM UTC

Thanks again Clay >You can show 2 buttons in the cell where you now have one. You can do it by: > >1) adding code in the renderer''s Constructor to add another button. > >public DropDownGridCellRenderer(GridControlBase grid, GridCellModelBase cellModel) > : base(grid, cellModel) >{ > this.DisableTextBox = true; > DropDownButton = new GridCellComboBoxButton(this); > this.AddButton(new GridCellComboBoxButton(this)); > this.dbgrid = null; >} > > >2) set the button bar size in the model''s constructor. > >public DBDropDownGridCellModel(GridModel grid) > : base(grid) >{ > ButtonBarSize = new Size(2 * 20, 20); >} > > >3) Add a OnButtonClicked override to catch the click on either button. A this point, you would have to decide which child grid you want to see, and implement some way to show it. > >protected override void OnButtonClicked(int rowIndex, int colIndex, int button) >{ > MessageBox.Show(button.ToString() + " clicked"); > //base.OnButtonClicked (rowIndex, colIndex, button); >} >

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

;