Articles in this section
Category / Section

How to enable the button in WinForms GridDataBoundGrid?

1 min read

The button can be shown in edit mode only can be achieved by register the ButtonEdit CellModel to GridDataBoundGrid. Set TableStyle.CellType as ButtonEdit cell type from CustomCellTypes option.  After register the cell type you need set property TableStyle.ShowButton as showCurrentCellEditing from GridShowButton options.


//Register the cell model -> Syncfusion.GridHelperClasses.Windows.dll
RegisterCellModel.GridDataBoundCellType(this.gridDataBoundGrid1, CustomCellTypes.ButtonEdit);
this.gridDataBoundGrid1.TableStyle.CellType = CustomCellTypes.ButtonEdit.ToString();
//show the buttons only on current cell editing.
this.gridDataBoundGrid1.TableStyle.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.ShowCurrentCellEditing;



'Register the cell model -> Syncfusion.GridHelperClasses.Windows.dll

RegisterCellModel.GridDataBoundCellType(Me.gridDataBoundGrid1, CustomCellTypes.ButtonEdit)

Me.gridDataBoundGrid1.TableStyle.CellType = CustomCellTypes.ButtonEdit.ToString()

'show the buttons only on current cell editing.

Me.gridDataBoundGrid1.TableStyle.ShowButtons = Syncfusion.Windows.Forms.Grid.GridShowButtons.ShowCurrentCellEditing



Button in edit mode in WinForms GridDataBoundGrid





I hope you enjoyed learning about how to enable the button click only on current cell in edit mode in WinForms GridDataBoundGrid. You can refer to our WinForms GridDataBoundGrid feature tour page to know about its other groundbreaking feature representations documentation
and how to quickly get started for configuration specifications.  You can also explore our WinForms GridDataBoundGrid example
to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial
to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsDirect-Trac, or feedback portal. We are always happy to assist you!

Did you find this information helpful?
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment