Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
235
Set focus on new row
posted

I am using the UltraWebGrid v8.2.  I have enabled the AllAddNewDefault and the AddNewRowDefault options so that a new row is displayed at the bottom of my grid (for entering new data).  The first column in my grid is setup as ColumnType.DropDownList and the second column is a double.  Whenever a new row is added (after entering data on a previous row and pushing the tab button), I need to set focus on the dropDownList column so that users may user their keyboards to enter data quickly.  I tried to setup the AfterRowInserHandler event but it doesn't seem to fire.  I do not way to show the "Add..." button for adding rows.  Here is the code for my event:

function uwgDetails_AfterRowInsertHandler(gridName, rowId, index) {

 

var row = igtbl_getRowById(rowId);

row.getCell(2).activate(); ;

row.getCell(2).beginEdit();

}

 

Is there a way to set the focus on the row after it has been added?

Parents
  • 235
    posted

    I should also note that I see a few other items that are causing problems.  I have an UpdateRow server side event handler that is firing so that my footers (setup in the Initalize_Layout handler) will display the totals correctly.  If I remove the UpdateRow handler, I seem to be getting the focus set on the row that I am editing, not the new row.  However, this will not allow my footers to recalculate after the user edits or adds a row.

Reply Children