Tuesday, December 1, 2015
It's been crazy busy at work, and one of the things that has made life harder was the choice to use DataTables and Knockout. They really don't play well with each other. It seems that DataTables makes it's own array of items based on the HTML elements when it is instantiated. If the underlying HTML is updated by Knockout the already instantiated DataTables array won't reflect the changes. This makes it very difficult to updated the underlying data and have the DataTables UI reflect the changes.
This drove me to work up a custom Knockout extension for a Paged, Sorted, Filtered Grid. This is a fully Knockout aware solution that allows you to update the underlying Knockout Observable Array and have the changes reflected in the UI presentation. Just what data binding is suposed to be :)
I've thrown up a working example at http://psfgrid.azurewebsites.net/ that for now will serve as it's home. Eventually I'll move it to GitHub to open up full sharing.