Cell button editor refers to a cell with an ellipsis button. This editor comes to use when you need to get an operation done or open a dialog on a button click. Such dialogs generally contain multiple different options or settings for a user to choose from.
Default Cell Button | Cell Button with Text | Cell Button with Custom Image |
---|---|---|
In FlexGrid, you can display a cell button by setting the ComboList property to an ellipsis character "...". You can also use a pipe character before ellipsis button to display an ellipsis with text box to let user enter his input. The CellButtonClick event is fired when user clicks the cell button. You can capture this event to implement the desired operation or display a dialog of your choice.
By default, the cell button gets displayed when cell enters the edit mode. However, you can set the ShowButtons property to Always to display the cell button even in non-edit mode.
Use the code below to display cell button in a WinForms FlexGrid column.
The ComboList property can also be set using the Combo List dialog at design time. To access the Combo List dialog:
The example below demonstrates change in back color and fore color of the current row on click of the cell button. Similarly, you can perform the desired operation in the CellButtonClick event.
By default, cell button displays an ellipsis. However, you can change the image of cell button using the CellButtonImage property.
Set the image of cell button in the WinForms FlexGrid as shown in the code below.