开发者

Slickgrid - How to update dataView with changed data

I'm using grid.onBeforeEditCell event to make a one-click YesNoCheckboxCellEditor.

Not sure if this is the best way to do this, but here is the code I created for this: Slickgrid - One-click checkboxes?

This works fine, but setting the data[] array directly doesn't seem to effect the dataView().

My understanding is that the dataView and data are completely uncoupled, and so when I have a filtered view, my data behind the filtered viewport will be incorrect.

Based on my code snippet, how do I also update the corresponding cell in the dataView ?

(I found the dataView.getItembyId and dataView.u开发者_StackOverflow社区pdateItem methods but unsure how to use these)

I've also tried: dataView.refresh(), grid.invalidateRow(), grid.render()

BTW, I'm following this example: http://mleibman.github.com/SlickGrid/examples/example-header-row.html


Use the grid.onClick instead of onBeforeEditCell. See the http://mleibman.github.com/SlickGrid/examples/example7-events.html example.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜