How to add multipls rows to the Grid using grid.addRowmethod

Hi,
I am trying to add multiple rows to the grid using grid.addRow() method.But only first row is getting added ,the other rows are not geting added.Can anyone help me.

Please find my code:

groupsGrid.enablePaging(true,20,10,“paging”);
groupsGrid.setPagingSkin(“toolbar”, “dhx_blue”);
groupsGrid.enableMultiline(true);
var group = groups.split(",");

             alert(group.length);
           for (var i=0;i<group.length ;i++){
               alert(group[i]);
            groupsGrid.addRow("i",["",group[i],""]);
           }

did you try this?

groupsGrid.addRow(i,["",group[i],""]);

You had the i being a string (“i”), so I think it would it putting the rows in the same place.

I tried in another way by parsing as a JS array into the grid:

var array = [[“0”,group[0],""],[“0”,group[1],""]];

           groupsGrid.parse(array, "jsarray");

This worked for me.I will try the other way also what ever u have suggested.Thanks for your reply.