Aspose.Cells.GridWeb.Examples.CSharp.Miscellaneous.DataBind.DataBind3.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)
        {
            switch (command)
            {
                case "ADD":
                    if (GridWeb1.ActiveSheetIndex == 0)
                    {
                        // Create new active row
                        GridWeb1.WebWorksheets.ActiveSheet.CreateNewBindRow();
                        // Scrolls the panel to the bottom.
                        GridWeb1.ViewPanelScrollTop = int.MaxValue.ToString();
                    }
                    break;

                case "DELETE":
                    if (GridWeb1.ActiveSheetIndex == 0)
                    {
                        if (GridWeb1.ActiveCell != null)
                            // Delete active row
                            GridWeb1.WebWorksheets.ActiveSheet.DeleteBindRow(GridWeb1.ActiveCell.Row);
                    }
                    break;
            }
        }