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.
ADAdministrator Syncfusion Team November 2, 2004 05:55 AM UTC
If you want just one cell like this (so no control sharing across multiple grid cells), then the easiest thing to do is to create a panel that holds your two instances of NumericUpDowns, an dthen use the Control cellType to display the panel in a cell. Below is some code.
If you want to have this control in several cells, then you would have to derive a cell control to do this. One way to do this is shown in the Grid\Samples\In Depth\DropDownFormAndUserControlSample sample.
Panel box = new Panel();
NumericUpDown ud1 = new NumericUpDown();
NumericUpDown ud2 = new NumericUpDown();
//stack them from the left
ud1.Dock = DockStyle.Left;
ud2.Dock = DockStyle.Left;
ud1.Width = 30;
ud2.Width= 30;
ud1.BorderStyle = BorderStyle.FixedSingle;
ud2.BorderStyle = BorderStyle.FixedSingle;
box.Controls.AddRange(new Control[]{ud1, ud2});
box.BorderStyle = BorderStyle.None;
gridControl1.RowHeights[2] = 20;
gridControl1.ColWidths[2] = 64;
gridControl1[2,2].CellType = "Control";
gridControl1[2,2].Control = box;
this.Controls.Add(box);
THThiyaguNovember 2, 2004 06:38 AM UTC
Thanks Clay. Thank you very much.
>If you want just one cell like this (so no control sharing across multiple grid cells), then the easiest thing to do is to create a panel that holds your two instances of NumericUpDowns, an dthen use the Control cellType to display the panel in a cell. Below is some code.
>
>If you want to have this control in several cells, then you would have to derive a cell control to do this. One way to do this is shown in the Grid\Samples\In Depth\DropDownFormAndUserControlSample sample.
>
>
>
>Panel box = new Panel();
>NumericUpDown ud1 = new NumericUpDown();
>NumericUpDown ud2 = new NumericUpDown();
>//stack them from the left
>ud1.Dock = DockStyle.Left;
>ud2.Dock = DockStyle.Left;
>ud1.Width = 30;
>ud2.Width= 30;
>ud1.BorderStyle = BorderStyle.FixedSingle;
>ud2.BorderStyle = BorderStyle.FixedSingle;
>box.Controls.AddRange(new Control[]{ud1, ud2});
>
>box.BorderStyle = BorderStyle.None;
>gridControl1.RowHeights[2] = 20;
>gridControl1.ColWidths[2] = 64;
>gridControl1[2,2].CellType = "Control";
>gridControl1[2,2].Control = box;
>this.Controls.Add(box);
>