jQuery UI Widgets Forums Grid new value does not return in jqxgrid cellvaluechanging method

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 10 years, 8 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • selva
    Participant

    Hi,

    Could you please help me. In my grid has 2 drop down list columns. The cellvaluechanging event always return newvalue is [Object Object] but old values returns exactly.

    Here is my code:

    
    $('#break_pattern_footer_edit').jqxGrid(
                            {
                                width: '600',
                                height: '250',
                                theme: theme_name,
                                editable: true,
                                selectionmode: 'singlecell',
                                altrows: true,
                                showtoolbar: true,
                                toolbarheight: 25,
                                rendertoolbar: function(toolbar) {
                                    var me = this;
                                    var container = $("<div style='margin: 5px;'></div>");
                                    var addButton = $("<div style='float: left; margin-left: 5px;margin-top:-4px;' title='Add Row'><img style='position: relative; margin-top: 0px;' src='jqx/images/add.png'/></div>");
                                    var deleteButton = $("<div style='float: left; margin-left: 5px;margin-top:-4px;' title='Delete Row'><img style='position: relative; margin-top: 0px;' src='jqx/images/minus.png'/></div>");
                                    toolbar.append(container);
                                    container.append(addButton);
                                    container.append(deleteButton);
                                    addButton.jqxButton({width: 20, height: 15, theme: theme_name});
                                    deleteButton.jqxButton({width: 20, height: 15, theme: theme_name});
                                    addButton.click(function() {
                                            var commit = $("#break_pattern_footer_edit").jqxGrid('addrow', null, datarow);
                                        }
                                    });
                                    deleteButton.click(function() {
                                        var selectedrowindex = $("#break_pattern_footer_edit").jqxGrid('getselectedrowindex');
                                        var rowscount = $("#break_pattern_footer_edit").jqxGrid('getrows');
                                        if (selectedrowindex >= 0 && selectedrowindex < rowscount.length) {
                                            var id = $("#break_pattern_footer_edit").jqxGrid('getrowid', selectedrowindex);
                                            var commit = $("#break_pattern_footer_edit").jqxGrid('deleterow', id);
                                        }
                                    });
                                },
                                columns: [
                                    {text: 'Break Relativity', columntype: 'dropdownlist', width: 200, datafield: 'breakRltvtyId', displayfield: "breakRltvtyNam",
                                        createeditor: function(row, column, editor) {
                                            editor.jqxDropDownList({source: dataAdapter_break_relativity, displayMember: "breakRltvtyNam", valueMember: 'breakRltvtyId', selectedIndex: 0, dropDownHeight: '100px'});
                                        }
                                    },
                                    {text: 'Break Format', columntype: 'dropdownlist', width: 200, datafield: 'breakFormtId', displayfield: "breakFrmtName",
                                        createeditor: function(row, column, editor) {
                                            editor.jqxDropDownList({source: dataAdapter_break_format, displayMember: "breakFrmtName", valueMember: 'breakFormtId', selectedIndex: 0, dropDownHeight: '100px'});
                                        },
                                        cellvaluechanging: function(row, datafield, columntype, oldvalue, newvalue) {
                                            alert(newvalue+"=="+oldvalue);
                                        }
                                    },
                                    {text: 'Start Time', columntype: 'datetimeinput', datafield: 'startTime', cellsformat: 'HH:mm:ss', width: 100,
                                        createeditor: function(row, column, editor) {
                                            editor.jqxDateTimeInput({showCalendarButton: false});
                                        }
                                    },
                                    {text: 'Duration', columntype: 'datetimeinput', datafield: 'duration', cellsformat: 'HH:mm:ss', width: 100, editable: false}
                                ]
                            });
    

    Dimitar
    Participant

    Hello selva,

    This information is insufficient for us to determine the source of the issue. It does not occur in the demo Customized Editors. Please make sure you are using the latest version of jQWidgets (3.2.2).

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/


    selva
    Participant

    Hi Dimitar,

    I upgraded my jqwidgets version from 3.2.1 to 3.2.2 but still i can’t get new value.


    Dimitar
    Participant

    Hi selva,

    Please provide us with a JSFiddle example we may test to determine why this issue occurs.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.