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

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

protected GridWeb1_CustomCommand ( object sender, string command ) : void
sender object
command string
Результат void
        protected void GridWeb1_CustomCommand(object sender, string command)
        {
            // Identifying a specific button by checking its command
            if (command.Equals("MyButton"))
            {
                // Accessing the cells collection of the worksheet that is currently active
                GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];

                // Putting value to "A1" cell
                sheet.Cells["A1"].PutValue("My Custom Command Button is Clicked.");

                // Set first column width to make the text visible
                sheet.Cells.SetColumnWidth(0, 30);
            }
        }
        // ExEnd:HandleCustomCommandEvent