Search
Grid.removeRows Method
See Also
 






Removes a range of rows.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

function removeRows (index, [count])

 Parameters

index

Number. The start index of the row range to remove.

count
Optional.

Number. The length of the range.

 Example

The following code handles the rowCommand event and uses the removeRows method to remove rows, after the user confirms the operation:

JavaScript  Copy Code

var ui = MindFusion.Common.UI;

grid.rowCommand.addEventListener(function (sender, args)
{
    if (args.commandName == "Delete")
    {
    ui.Dialogs.showConfirmDialog("Confirm", "Delete record?", function (result)
           {
              if (result == ui.ModalResult.OK)
              {
                  grid.removeRows(this.row);
              }
          }
     }
}

 See Also