Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Currently, Aspose.Cells.GridDesktop support adding three types of cell controls, which include the following:
All of these controls are derived from an abstract class, CellControl. Each worksheet contains a collection of Controls. New cell controls can be added and existing ones can be accessed using this Controls collection easily.
IMPORTANT: If you want to add cell controls to all cells of a column instead of adding one by one then you can refer to Managing Cell Controls in Columns.
To add a button into the worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
While adding Button , we can specify the cell’s location (where to display it), width & height and the caption of the button.
We have discussed about adding Button control to the Worksheet but what is the advantage of just having a button in the worksheet if we cannot use it. So, here comes the need of event handling of the button.
To handle the Click event of the Button control, Aspose.Cells.GridDesktop provides CellButtonClick event that should be implemented by the developers according to their needs. For an instance, we have just displayed a message when the button is clicked as shown below:
We can set background image/picture for the button control with its label/text as shown in the code below:
IMPORTANT: All events of cell controls contain a CellControlEventArgs argument that provides the row and column numbers of the cell that contains the cell control (whose event is triggered).
To add a checkbox into the worksheet using Aspose.Cells.GridDesktop, please follow the steps below:
While adding CheckBox , we can specify the cell’s location (where to display it) and state of the checkbox.
Aspose.Cells.GridDesktop provides CellCheckedChanged event that is triggered when the Checked state of the checkbox is changed. Developers can handle this event according to their requirements. For an instance, we have just displayed a message to show the Checked state of the checkbox in the code below:
To add a combobox into the worksheet using Aspose.Cells.GridDesktop , please follow the steps below:
Aspose.Cells.GridDesktop provides CellSelectedIndexChanged event that is triggered when the Selected Index of combobox is changed. Developers can handle this event according to their desires. For an instance, we have just displayed a message to show the Selected Item of the combobox:
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.