Aspose.Cells.GridWeb.Examples.CSharp.GridWebBasics.InitCustomCommandButton.btnInitCommandButton_Click C# (CSharp) Метод

btnInitCommandButton_Click() защищенный Метод

protected btnInitCommandButton_Click ( object sender, EventArgs e ) : void
sender object
e EventArgs
Результат void
        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
        }