EasyUI Forum
September 16, 2025, 03:41:35 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: combobox value revert back after pressing on save button in the grid  (Read 7151 times)
wel
Newbie
*
Posts: 30


View Profile Email
« on: January 08, 2016, 10:37:39 AM »

I have a problem I have a combobox inside a grid and when I edit the combobox value and then press on save button the value  revert back to previous value !! although the selected value is stored correctly in the database

here is the column code:

Code:
<th data-options="field:'work_group_id',width:20,
                                    formatter:function(value,row){
                                        return row.work_group;
                                    },
                                    editor:{
                                        type:'combobox',
                                        options:{
                                            valueField:'work_group_id',
                                            textField:'work_group',
                                            method:'get',
                                            url:'pages/work_groups.php',
                                            required:true
                                        }
                                    }">Work Group
                                </th>

and a video display the problem.

https://vid.me/Qk62
Logged
jarry
Administrator
Hero Member
*****
Posts: 2298


View Profile Email
« Reply #1 on: January 09, 2016, 12:58:57 AM »

Please refer to http://www.jeasyui.com/tutorial/datagrid/datagrid12.php
Logged
wel
Newbie
*
Posts: 30


View Profile Email
« Reply #2 on: January 09, 2016, 06:46:18 AM »

Thanks Jarry,
Do I must use the onEndEdit function ?

Code:
onEndEdit:function(index,row){
var ed = $(this).datagrid('getEditor', {
index: index,
field: 'productid'
});
row.productname = $(ed.target).combobox('getText');
},
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!