protected void btnInitCommandButton_Click(object sender, EventArgs e)
{
// ExStart:InitCustomCommandButton
// Instantiating a CustomCommandButton object
CustomCommandButton button = new CustomCommandButton();
// Setting the command, text and image URL for button. Image should be relative to website root folder
button.Command = "MyButton";
button.Text = "MyButton";
button.ImageUrl = "../Image/aspose.ico";
// Adding button to CustomCommandButtons collection of GridWeb
GridWeb1.CustomCommandButtons.Add(button);
// ExEnd:InitCustomCommandButton
}