EasyUI Forum

General Category => Bug Report => Topic started by: samuelzhu001 on September 28, 2016, 02:23:41 PM



Title: GetChanges() in Datagrid returns unchanged rows when there are numbers.
Post by: samuelzhu001 on September 28, 2016, 02:23:41 PM
When I use cell editing datagrid, GetChanges() returns the rows that I just click in but make no changes. I find that it only occurs when data contains numbers. For instance, the original data is {qty:10},  it becomes {qty:'10'} after editing.


Title: Re: GetChanges() in Datagrid returns unchanged rows when there are numbers.
Post by: jarry on September 28, 2016, 07:10:09 PM
To solve your issue, you can convert your 'qty' field value to a string value, or override the 'getValue' method of numberbox.
Code:
<script type="text/javascript">
(function($){
    $.extend($.fn.numberbox.methods, {
        getValue: function(jq){
            value = jq.textbox('getValue');
            return parseFloat(value)||'';
        }
    });
})(jQuery);
</script>