## CustomCommandButton class

表示 GridWeb 控件选项卡栏中的自定义命令按钮。

```csharp
public class CustomCommandButton : Control, ISerializable
```

## 构造函数

| 姓名 | 描述 |
| --- | --- |
| [CustomCommandButton](customcommandbutton)() | 默认构造函数。 |

## 特性

| 姓名 | 描述 |
| --- | --- |
| [ClientClickEvent](../../aspose.cells.gridweb/customcommandbutton/clientclickevent) { get; set; } | 获取或设置客户端点击事件处理程序。 |
| [Command](../../aspose.cells.gridweb/customcommandbutton/command) { get; set; } | 获取或设置命令名称。 |
| [CommandType](../../aspose.cells.gridweb/customcommandbutton/commandtype) { get; set; } | 获取或设置命令的渲染类型。 类型可以是命令按钮或上下文菜单项。 |
| [DiscardInput](../../aspose.cells.gridweb/customcommandbutton/discardinput) { get; set; } | 指示当用户单击此按钮时是否丢弃客户端浏览器中的用户输入。可以用作“撤消”操作。 |
| [ImageUrl](../../aspose.cells.gridweb/customcommandbutton/imageurl) { get; set; } | 获取或设置命令按钮的图像 url。如果设置为 null 或空字符串，按钮将只显示它的文本。 |
| [Text](../../aspose.cells.gridweb/customcommandbutton/text) { get; set; } | 获取或设置命令按钮的替代文本。 |
| [ToolTip](../../aspose.cells.gridweb/customcommandbutton/tooltip) { get; set; } | 获取或设置命令按钮的工具提示。 |
| [Width](../../aspose.cells.gridweb/customcommandbutton/width) { get; set; } | 按钮的宽度。 |

## 方法

| 姓名 | 描述 |
| --- | --- |
| [GetObjectData](../../aspose.cells.gridweb/customcommandbutton/getobjectdata)(SerializationInfo, StreamingContext) | 仅供内部使用。 |

### 例子

```csharp
[C#]
CustomCommandButton button = new CustomCommandButton();
button.Command = "MyCommand";
button.ImageUrl = "images/button1.gif";
GridWeb1.CustomCommandButtons.Add(button);
[VB]
Dim button As CustomCommandButton =  New CustomCommandButton()
button.Command = "MyCommand"
button.ImageUrl = "images/button1.gif"
GridWeb1.CustomCommandButtons.Add(button)
```

### 也可以看看

* 命名空间 [Aspose.Cells.GridWeb](../../aspose.cells.gridweb)
* 部件 [Aspose.Cells.GridWeb](../../)

<!-- DO NOT EDIT: generated by xmldocmd for Aspose.Cells.GridWeb.dll -->
