Search
Grid.selectRows Method
See Also
 






Selects the rows in the specified range.

Namespace: MindFusion.DataViews
File: Grid.js

 Syntax

JavaScript  Copy Code

function selectRows (index, [count])

 Parameters

index

Number. The start index of the range to select.

count
Optional.

Number. The length of the range.

 Example

The following code handles the rowCommand event and uses the selectRows method to select the edited row:

JavaScript  Copy Code

grid.rowCommand.addEventListener(function (sender, args)
{
    if (args.commandName == "Save")
    {
       var editRow = args.row;
       grid.allowEdit = false;
       grid.allowCellSelect = false;

       grid.getRowElement(editRow).style.outline = "";
       grid.selectRows(editRow);
       grid.element.style.pointerEvents = "all";
 
       grid.refresh(true);
    
    }
}

 See Also