jQuery UI Widgets Forums Grid Strange behavior on loadcomplete

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

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Strange behavior on loadcomplete #47536

    antonomase
    Participant

    Hi,

    Based on the example jqxgrid/bindingtojson.htm

    I want to change the datas received by the dataAdapter. In my real case change the html “& euro ;” to the euro symbol.
    In the example, add “modified” to the name

    I modify the example and change the dataAdapter definition

    var dataAdapter = new $.jqx.dataAdapter(source, {
      loadComplete: function (records) {
        var records = dataAdapter.records;
        var length = records.length;
        for (var i = 0; i < length ; i++) {
          var record = records[i];
          record["name"] = record["name"] + " modified";
        }
      }
    });

    When I display the grid, the ‘modified’ text is not displayed even if I put async: false in the source properties.

    If I put “showfilterrow: true, filterable: true” in the jqxGrid properties, the text “modified” is added in the column ‘name’ onky when I type something in one of the filter boxes.

    So my question : how to have the modified rows directly in the grid ?

    Strange behavior on loadcomplete #47539

    Peter Stoev
    Keymaster

    Hi antonomase,

    If you want to make data modifications, use beforeLoadComplete and return the updated records Array as shown here – http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxdataadapter/jquery-data-adapter.htm.

    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.