Frage

I am using ajax with jQuery, in 'success'callback, I am able to get the data in JSON type, I want to display it using slickgrid, when I pass data array in the slickgrid api constructor I am able to dsipaly it in the grid, but when I use DataView I am not able to display it in the grid, though grid is displayed but data is not populated in the grid. Any help would be greatly appreciate. Thanks.

War es hilfreich?

Lösung

Actually for displaying json in slickgrid, json must have a field 'id' which should be unique.

Andere Tipps

Without seeing the code, it will be hard to diagnose. Did you use the setItems method on DataView?

// This will fire the change events and update the grid.
dataView.setItems(data);

This is from the DataView section on the SlickGrid docs: https://github.com/mleibman/SlickGrid/wiki/DataView

By using setItems, DataView knows that the data changes, and will take the appropriate steps to update the grid.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top