EasyUI Forum
October 11, 2025, 09:00:44 PM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News:
 
   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: [SOLVED] Select Cell after row update  (Read 7594 times)
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« on: March 06, 2017, 07:53:53 AM »

Hello
I'm using datagrid cell editing extension and here is the problem:
after doubleclicking on some cell on column A and after updating value on column B, previously selected cell in column A is no more selected. I'm updating row like:
Code:
  $('#dg').datagrid('updateRow',{
    index: index,
    row: {
      total: amount
    }
  });  
How can selected cell remain selected like before I call updateRow?
With other words, if I don't call updateRow, cell remain selected but I need to somehow update cell on column B and I don't see updateCell so I call updateRow and it de-selects cell which was selected and edited.
Thank you.
« Last Edit: March 07, 2017, 02:23:31 AM by Pierre » Logged
jarry
Administrator
Hero Member
*****
Posts: 2300


View Profile Email
« Reply #1 on: March 06, 2017, 11:51:12 PM »

Please call the 'gotoCell' method to move to the special cell after calling 'updateRow' method.
Code:
$('#dg').datagrid('updateRow', ...);
$('#dg').datagrid('gotoCell', {
  index: index,
  field: 'itemid'
});
Logged
Pierre
Sr. Member
****
Posts: 439


View Profile Email
« Reply #2 on: March 07, 2017, 02:23:19 AM »

Awesome! Thank you so much.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!