knockoutjs support

knockoutjs support

devmddevmd Posts: 3Questions: 0Answers: 0
edited September 2013 in General
I've a page where I'd like to use knockout. Simplified code snippet:



The table displays all records in one page, but pagination and search box do not work at all. Search box or changing the page size always returns 0 record. Anyone has a workaround? I like the tables so much but knockout has to stay too. Thanks

Replies

  • devmddevmd Posts: 3Questions: 0Answers: 0
    I found this http://datatables.net/dev/knockout/. Good for now.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    Feedback on that example is very welcome - thread here: http://datatables.net/forums/discussion/16160/knockout-observables-and-datatables-1.10-pre-beta-feedback-please#Item_22

    Allan
  • devmddevmd Posts: 3Questions: 0Answers: 0
    Allan, your code is good if data is array of observables. What if I simply display a read only table where array item is plain javascript object ? I tried to change the code but not experienced enough to make it work. Is there an example? I can't find it. Many thanks.
  • allanallan Posts: 63,498Questions: 1Answers: 10,471 Site admin
    > What if I simply display a read only table where array item is plain javascript object ?

    A plain array can be displayed like this: http://datatables.net/release-datatables/examples/data_sources/js_array.html . No interaction with Knockout needed.

    Allan
This discussion has been closed.