Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
10440 | Feb 2,2004 05:42 PM UTC | Feb 3,2004 02:54 AM UTC | WinForms | 2 |
![]() |
Tags: GridControl |
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);
}
>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);
>}
>
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.
This page will automatically be redirected to the sign-in page in 10 seconds.