Note that there are some explanatory texts on larger screens.

plurals
  1. POSlickGrid endUpdate not working
    primarykey
    data
    text
    <p>I have looked over the examples given by the SlickGrid wiki as well as searched over stackoverflow, but I am having trouble finding a solution to my problem. I am trying to display random data about tweets I am receiving from the Twitter API using SlickGrid.</p> <p>In my script, the grid and dataview seem to initialize after I call beginUpdate(), however, the script seems to crash on endUpdate(). Here is my code:</p> <pre><code>function TweetGrid(){ this.dataView = new Slick.Data.DataView(); this.grid = this.initGrid(); this.dataView.onRowCountChanged.subscribe(function(e, args){ grid.updateRowCount(); grid.render(); }); this.dataView.onRowsChanged.subscribe(function(e, args){ grid.invalidateRows(args.rows); grid.render(); }); //dummy value for testing var data = [{ id: "id_1", Time: "11:11:11", PictureUrl: "someimageurl", Name: "name", ScreenName: "screen name", Text: "some tweet" }]; this.dataView.beginUpdate(); alert("Begin Update"); //this gets called this.dataView.setItems(data); alert("Set items"); //this gets called this.dataView.endUpdate(); alert("End Update"); //this DOES NOT get called - script does not move on this.dataView.render(); alert("data rendered"); } TweetGrid.prototype.initGrid = function(){ var columns = [ { id: "Time", name: "Time", field: "Time", cssClass: "custom-column" }, { id: "PictureUrl", name: "Picture", field: "PictureUrl", cssClass: "custom-column" }, { id: "Name", name: "Name", field: "Name", cssClass: "custom-column" }, { id: "ScreenName", name: "Screen Name", field: "ScreenName", cssClass: "custom-column" }, { id: "Text", name: "Tweet", field: "Text", cssClass: "custom-column" } ]; var options = { enableCellNavigation: true, forceFitColumns: true, enableColumnReorder: false }; return new Slick.Grid("#tweetGrid", this.dataView, columns, options); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload