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
425
WebDataGrid - Open Edit Mode after page is loaded
posted

iam trying to make edit mode activate after any postback or any page load but it doesnt seem like I can find a solution: I want to Activate the edit mode of the WebDataGrid  and open the last row slected and opened row, when the user load the page .

i tried to get the current opened row and opened but it didn't work

 var rowIndex = eventArgs.get_item().get_row().get_index();
 var editingCore = row.get_grid().get_behaviors().get_editingCore();
 var rowEditingTemplate = editingCore.get_behaviors().get_rowEditing();
  rowEditingTemplate.enterEditMode(rowIndex);
Parents
No Data
Reply
  • 2535
    Offline posted

    Hi,

    When you are using the RowEditing behavior the enterEditMode need as parameter a call. The row is parsed only for RowEditingTemplate.

    You can modify your code to:

     var row = eventArgs.get_item().get_row();
    // Get for example firs cell in the row
     var cell = row.get_cell(0);
     var editingCore = row.get_grid().get_behaviors().get_editingCore();
     var rowEditing = editingCore.get_behaviors().get_rowEditing();
     rowEditing.enterEditMode(cell);

Children