Grid method "getChangedRows" not working

The usage is pretty straightforward; here is my code:

var changed = mygrid.getChangedRows(true);
alert(changed);
if (changed) { ...... }
else { alert("nothing changed!"); }

The first alert shows nothing and the second one actually is activated. This happens after I make a change in a row (and the row gets highlighted).

getChangedRows() method returns string - list of ids of changed rows with default delimiter (comma)
If no rows are changed, method returns empty string