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 create custom column in winforms datagrid?
2
-
This repositories contains the samples to create custom column in winforms datagrid
1
+
# How to create custom column in winforms datagrid
2
+
3
+
This repositories contains the samples to create custom column in [WinForms DataGrid](https://www.syncfusion.com/winforms-ui-controls/datagrid).
4
+
5
+
You can create a new column by deriving [GridColumn](https://help.syncfusion.com/cr/windowsforms/Syncfusion.WinForms.DataGrid.GridColumn.html) and create new a cell renderer by overriding the predefined renderer in `SfDataGrid`. The following steps describe how to create a sparkline column as a custom column.
6
+
7
+
### Creating custom column
8
+
9
+
You can create a custom column by overriding a new class from the `GridColumn` class.
10
+
11
+
### Creating renderer
12
+
13
+
After creating a custom column, you need to create renderer for the custom column. You can create custom renderer by deriving the [GridCellRendererBase](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Grid.GridCellRendererBase.html) class.
14
+
15
+
### Adding the custom renderer to CellRenderers collection
16
+
17
+
By using the following code, you can add the previous created custom renderer to the [SfDataGrid.CellRenderers](https://help.syncfusion.com/cr/windowsforms/Syncfusion.Windows.Forms.Grid.GridCellRendererCollection.html) collection.
18
+
19
+
### Loading custom column
20
+
21
+
By using the following code, you can define the custom column in SfDataGrid.
0 commit comments