jqGrid with BackboneJS

In one of my past project we (team) used Backbone to give structure to web application and jqGrid for data display and manipulation. The data layer was RESTful JSON api and the problem that I faced that we were fetching data through Backbone’s RESTful JSON interface, however for other CRUD requests we wrote custom functions. So basically it was one-way data binding and once data arrived from server, the job of Backbone Collection was done.

As novice Backbone and jqGrid developer, I wondered why couldn’t we bind Backbone Collection to View (jqGrid) two-way, so that the collection get updated when we manipulate grid records and therefore synchronized with server automatically, leveraging Backbone. So, I googled and searched stackoverflow and found no help.

Now that I’m well up in Backbone and I know we can achieve that, I would like to share my-way :).

Read more…