You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
How to implement NumericUpDown inside SfDataGrid using Custom Column support.
1
+
# How to implement NumericUpDown inside SfDataGrid using Custom Column support.
2
+
3
+
To achieve the requirement of implementing a NumericUpDown inside an SfDataGrid column, follow these steps:
4
+
5
+
**Step 1** : Create a custom column by overriding a new class derived from the GridColumn class.
6
+
7
+
```C#
8
+
publicclassNumericUpDownExtColumn : GridColumn
9
+
{
10
+
publicNumericUpDownExtColumn()
11
+
{
12
+
SetCellType("NumericUpDown");
13
+
}
14
+
15
+
}
16
+
```
17
+
18
+
**Step 2** : After creating a custom column, you need to create a renderer for the custom column. You can create a custom renderer by deriving from the GridCellRendererBase class.
19
+
20
+
**Step 3** : In the OnRender method, you can create a NumericUpDown control. Within this method, initialize the properties for the NumericUpDown control, and finally, add the declared control into the DataGrid TableControl.
21
+
22
+
You can add any other controls in the OnRender method by following this procedure based on your needs.
Take a moment to peruse the [Winforms - DataGrid Custom Column Support UG Documentation](https://help.syncfusion.com/windowsforms/datagrid/columntypes#custom-column-support), to learn more about Custom Column support with examples.
0 commit comments