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.
I have attempted to change the default button size on the grid by doing something like:
grid.TableStyle.CellModel.ButtonBarSize = new Size(24,12);
However, the grid seems to ignore this. How do I change the button size to prevent the button from filling the entire cell? I would rather not implement a custom cell for a simple button size specification. Thanks.
ADAdministrator Syncfusion Team November 23, 2004 05:18 AM UTC
You have to do this on a CellType basis. SO, to size all comboboxes, use code like:
GridCellModelBase model = this.gridControl1.CellModels["ComboBox"];
model.ButtonBarSize = new Size(12, 6);
ADAdministrator Syncfusion Team November 23, 2004 04:46 PM UTC
That didn''t seem to work, here is some of the code:
grid[1,7].CellType = "PushButton";
grid[1,7].Description = "Click";
grid[1,7].TextColor = Color.Black;
grid.CellModels["PushButton"].ButtonBarSize = new Size(10,6);
I have tried moving the last line before the other three and it still does not work. Want I want is a button type cell that has a very small button even when the cell itself is very wide.
>You have to do this on a CellType basis. SO, to size all comboboxes, use code like:
>
>GridCellModelBase model = this.gridControl1.CellModels["ComboBox"];
>model.ButtonBarSize = new Size(12, 6);
>
ADAdministrator Syncfusion Team November 23, 2004 05:06 PM UTC
The PushButton celltype is special. It is designed to be sized to the cell since it is intended to occupy the entire clientarea of the cell. If you do not want the pushbutton to occupy the whole cell, you can set style.BorderMargins.Left, style.BorderMargins.Right, (Top and Bottom) properties to tell the button not to use that part of the cell.
The code I gave does work with a ComboBox button.
ADAdministrator Syncfusion Team November 23, 2004 08:03 PM UTC