EasyUI Forum
September 13, 2025, 12:12:19 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: cannot updateRow with frozen columns [Solved]  (Read 9308 times)
devnull
Sr. Member
****
Posts: 431


View Profile
« on: February 02, 2015, 03:41:47 AM »

I have a datagrid with both columns[] and frozenColumns[].

When I do an updateRow(), the frozen columns are updated, but the normal columns are not.
« Last Edit: February 02, 2015, 04:28:46 AM by devnull » Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #1 on: February 02, 2015, 03:46:30 AM »

The 'updateRow' method can update all the column fields, please check your code carefully to see if the new field values are set correctly.
Code:
$('#dg').datagrid('updateRow',{
    index:1,  // the row index
    row:{
        productid:'pid',  // the frozen column field
        listprice:100  // the normal column field
    }
})
Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #2 on: February 02, 2015, 03:53:57 AM »

Thanks for the quick reply, I was debugging it when you replied and just discovered the cause.

The field has a formatter function and it appears to be this that is preventing the field from being updated for some reason.

The formatter function works fine on the initial load, but won't work on a rowupade, I am investigating now...

Logged

-- Licensed User --
stworthy
Administrator
Hero Member
*****
Posts: 3581


View Profile Email
« Reply #3 on: February 02, 2015, 04:15:37 AM »

The 'formatter' function also works fine after calling 'updateRow' method. Please refer to this example http://jsfiddle.net/7taa4twv/1/
« Last Edit: February 02, 2015, 04:17:11 AM by stworthy » Logged
devnull
Sr. Member
****
Posts: 431


View Profile
« Reply #4 on: February 02, 2015, 04:28:26 AM »

Thanks, yes I can see that now.

My formatter added an unordered list and listitems so that I can display multiple rows in a single cell.

My apologies, I should have tested more thoroughly before posting.

I will mark the post as solved, thanks again.

Logged

-- Licensed User --
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!