Question

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.

Was it helpful?

Solution

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

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top