Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1170
Ig grid multi select with knockout
posted

I would like to use mutli select with checkboxes functionality of ig grid with knockout. In my collection of records i have observable called "selected". I want to know how i can tie this observable with ig gird multi select so if someone select/unselect the row this observable will also change and if I modify this observable it select/unselect the row. Also i want to implement the same for select all checkbox.

-Manish

Parents
No Data
Reply
  • 5513
    Offline posted

    Hello Manish,

    There is no built-in functionality that ties the selected rows with a property from a KO model. However, using igGridSelection's events and API you can implement it yourself. I am attaching a sample showing one way this can be achieved. Another way could be specifying the selected observable as computed, then implementing a getter that asks Selection if the specific row is selected and a setter that uses Selection's API to select the row, essentially leaving Selection as the only holder of the actual selected value for each row.

    I hope this helps! Thank you for using Infragistics forums!

    Best regards,

    Stamen Stoychev

    ko-selection-sample.zip
Children