EasyUI Forum

General Category => EasyUI for jQuery => Topic started by: alex_wijoyo on March 02, 2013, 11:41:17 PM



Title: Datagrid Row Changed Internally but Not Shown on Datagrid
Post by: alex_wijoyo on March 02, 2013, 11:41:17 PM
Hi, I have these two events on my detailview edatagrid for updating parent row after detail row save or destroy. I have tested that parent row internally has changed. But the parent row contents are not shown on parent Datagrid. Can anyone help me with this problem? Thanks in advance.

Code:
                            onSave: function(index, row){
                                var url=dg.edatagrid('options').url;
                                $.post(url, {searchcol:'id',searchval:row.teamId}, function(data){
                                    for(var prop in data.rows[0]) {
                                        parentRow[prop]=data.rows[0][prop];
                                    }
                                },'json');
                            },
                            onDestroy: function(index, row){
                                var url=dg.edatagrid('options').url;
                                $.post(url, {searchcol:'id',searchval:row.teamId}, function(data){
                                    for(var prop in data.rows[0]) {
                                        parentRow[prop]=data.rows[0][prop];
                                    }
                                },'json');
                            },

Regards,

Alex Wijoyo


Title: Re: Datagrid Row Changed Internally but Not Shown on Datagrid
Post by: stworthy on March 03, 2013, 12:34:41 AM
Please call 'refreshRow' method for parent grid after set the field value of parent row, or call 'updateRow' method to directly update the parent row.