It is something difficult to answer on your question because you don't post the code. The afterSubmit is nice if you want to change something in the server response before the data will be added to the grid. On the other side from the same reason the function is not a good place for the row selection.