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;
}
}