jQWidgets Forums

jQuery UI Widgets Forums Grid jqxGrid Cannot call method ‘toString’ of null

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 7 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • hi team

    i have a grid and bind data using knockout.

    when i delete grid datasource data which have modified in grid, will appear Cannot call method ‘toString’ of null error.

    but if i not changed the data in grid,don’t appear error.

    mycode:

    meGVM.removeItem = function () {

    var rowIndex = meGVM.getDeleteRow();
    if (rowIndex < 0) {
    return;
    }
    var myitem = meGVM.items()[rowIndex];
    var rowStatus = ko.utils.unwrapObservable(myitem["RowStatus"]);
    if (rowStatus == "New" || rowStatus == "NewModified") {
    meGVM.items.splice(rowIndex, 1);// will happen error when data changed
    }
    else {

    myitem = ko.mapping.fromJS(myitem);
    myitem["RowStatus"]("Deleted");
    meGVM.items.splice(rowIndex, 1);// will happen error when data changed
    meGVM.deleteBuffer.push(myitem);
    }
    };


    Peter Stoev
    Keymaster

    Hi zhq3k@163.com,

    Unfortunately, we cannot tell what goes wrong from the provided sample code. Please post a complete sample which reproduces the reported behavior or send it to support@jqwidgets.com. This will allow us to test and debug your specific scenario.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.