protected void btnDeleteRow_Click(object sender, EventArgs e)
{
if (Page.IsValid)
{
// ExStart:DeleteRow
// Accessing the reference of the worksheet that is currently active
GridWorksheet sheet = GridWeb1.WorkSheets[GridWeb1.ActiveSheetIndex];
// Get row index entered by user
int rowIndex = Convert.ToInt16(txtRowIndex.Text.Trim());
// Delete row at specified index
sheet.Cells.DeleteRow(rowIndex);
// ExEnd:DeleteRow
}
}