The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
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
ADAdministrator Syncfusion Team 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);
}
ADAdministrator Syncfusion Team 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);
>}
>