Mostrar botones para Agregar/Eliminar hojas de trabajo

Aspose.Cells GridWeb ahora admite agregar y eliminar hojas mediante el uso de botones en la barra de herramientas. Para que los botones sean visibles en la interfaz, debe configurarGridWeb1.ShowAddButton averdadero. El siguiente fragmento de código muestra cómo agregar botones Agregar o quitar a la barra de herramientas de GridWeb.

Código de muestra

// For complete examples and data files, please go to https://github.com/aspose-cells/Aspose.Cells-for-.NET
protected void Page_Load(object sender, EventArgs e)
{
GridWeb1.SheetAdded += GridSheetAdded;
// If first visit this page clear GridWeb1 and load data
if (!IsPostBack && !GridWeb1.IsPostBack)
{
// Show button to add and delete sheet
GridWeb1.ShowAddButton = true;
GridWeb1.WorkSheets.Clear();
GridWeb1.WorkSheets.Add();
}
}
void GridSheetAdded(object sender, GridWorksheet sheet)
{
sheet.Cells.StandardHeightPixels = 30;
sheet.Cells.StandardWidthPixels = 100;
}