I have a grid where the users add rows by clicking the add button and then type text in the row/cell. I want to set the focus on the newly added cell/row because currently after adding the new row the user again has to click inside the new row/cell for typing his text. Is there a way to set the focus on the newly added row/cell (client side). I tried the following but it didn't worked.
{
var row = igtbl_getRowById(rowId);
row.getCell(0).select();
row.getCell(0).focus();
}
Ruman,
In addition to this how can I then trigger the row edit template to display? I don't want the user to have to click on a new blank row for the template to pop up. I want this to happen automatically.
R
Hello,
I was able to reproduce your scenario, and with slight modification I was able to get the cell select and then even begin editing automatically. Here is miy event handler:
<script type="text/javascript"> function rowInsert(gridName, rowId, index)
{ var row = igtbl_getRowById(rowId); row.getCell(0).activate();; row.getCell(0).beginEdit(); } </script>
Hope this helps. I can send you my complete grid ASPX setup if this will help.