Change value of selected cells

I have some rows selected.

Now I like change value (to “Some value”) for each selected cells where columnID = “someID”


idA idB

1 a

2 b *

3 c *

4 d

(* - row selected)

I like change “b” and “c” (selected cells where columnID = “idB”) to “Some value”

var ids = grid.getSelectedRowId().split(",")
for (var i=0; i<ids.length; i++)
grid.cells(ids[i],grid.getColIndexById(“idB”)).setValue(“Some value”);