how to get the count for selected rows

How to get the Selected Rows count in the DHTML Grid…

Suppose I selected the rows in Grid 1,2,3,4

How can I get the total count of the selected Rows…

I want to get the total count is 4…

Please suggest some solution

Thanks and Regards


You can get it as
    var count = grid.getSelectedId().split(",").length;