dojo - A dgrid row disappears when sorting -


I have implemented dgrid. It is really clear though, when I click on the row to sort it, but All in a row disappears, I am trying to understand how mad is going ....

Let's go to it.

DGrid, it's a dojo-based data grid, see

When using JavaScript and HTML and join the Observavist Memestor, the grid is populated, in which many rows Data is happily displayed. Columns are sortable, that is, you can click on the row / column title. However - and here's the problem - when these row / column headings are clicked to collapse the line row, then all one row disappears

One memory (dojo / store / memory) Using Digit Data Store is a good job - that is, to sort the rows successfully; however, when observation (dojo / store / inspection) is used as a data store, then order rows Causes fall Please see the examples given below.

Working with memory:

  function populateGrid (memory, message) {var featureOne = {"id": message [0] .Quality ["id "Call 2": Message [0] .Quality ["Col2"], "Call 3": Message [0]. Properties [["Col3"]} var attribute = 2 = {"id": message [ Message [1]. Property ["Col2"], "Call 3": Message [1]. Property ["Col3"]} var data = [feature1, feature2] ; Var memStore = new memory ({data: data}); Window.queryRecordsGrid.set ("Store", Memestor); }   

An error occurs when viewing:

  var memStore; ["Call 2": Message [0]. ["Col2"] ["Col2"], "Call 3": Message [0] .attributes ["Col3"]} var data = [feature]; If (! Window.memStore) {window.memStore = new Observable (new storage ({data: data})); Window.grid.set ("store", window.memStore); } And {window.grid.store.notify (feature, feature.id); }}    

this may or may be your issue, but currently your Items do not have unique identifiers in the store - or if they do, they do not have to properly store the store item dojo / store / memory defaults to each one unique < Code> id if you have an area that provides unique identifier, you can memory idProperty setting, can be aware of it:

  new Observable (new memory ({idProperty: "Col1", data: data}));   

You also believe that feature.id is present when you call notify as far as I tell from my code I can not, it does not exist.

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -