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

InstantiateCustomCommandButton() приватный Метод

private InstantiateCustomCommandButton ( ) : void
Результат void
        private void InstantiateCustomCommandButton()
        {
            // Instantiating a CustomCommandButton object
            CustomCommandButton button = new CustomCommandButton();

            // Setting the command for button
            button.Command = "MyButton";

            // Setting text of the button
            button.Text = "MyButton";

            // Setting image URL of the button, should be relative to website root folder
            button.ImageUrl = "../Image/aspose.ico";

            // Adding button to CustomCommandButtons collection of GridWeb
            GridWeb1.CustomCommandButtons.Add(button);
        }