Multiple bindings on data-bind

5 posts, 1 answers
  1. Chris
    Chris avatar
    38 posts
    Member since:
    Feb 2012

    Posted 30 Mar 2012 Link to this post

    Another question for you lovely Kendo people!

    I'm currently struggling to bind more than one function to a Grid, my code is:

    <div id="grid" data-role="grid" data-bind="source: gridSource"></div>

    Which works fine, but I want this Grid to be a multi-selectable Grid (my own Kendo extension) and can't seem to bind this when I try:

    <div id="grid" data-role="grid" data-bind="source: gridSource, selectableGrid: selectOptions"></div>

    The error displays as "selectableGrid" is not supported by "div" or something along those lines. However, if I try and just use the selectableGrid without the source binding, then it works fine.

    Any suggestions, or will this be fixed in a future release?
  2. Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Mar 2012 Link to this post

    Hi,

     We can't really say anything without seeing the code first.

    All the best,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Chris
    Chris avatar
    38 posts
    Member since:
    Feb 2012

    Posted 30 Mar 2012 Link to this post

    This is a demo of the failing scenario: http://jsfiddle.net/Xxn22/3/
    I've worked with Knockout a lot, and this is where I'm basing my concepts from.
  4. Answer
    Atanas Korchev
    Admin
    Atanas Korchev avatar
    8462 posts

    Posted 30 Mar 2012 Link to this post

    Hello,

     Custom widget binders are special :) They live in another namespace. Here is the updated jsfiddle: http://jsfiddle.net/korchev/Xxn22/4/ 

     Also make sure you call kendo.bind *after* registering the custom binder.

    Regards,
    Atanas Korchev
    the Telerik team
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  5. Chris
    Chris avatar
    38 posts
    Member since:
    Feb 2012

    Posted 30 Mar 2012 Link to this post

    Amazing, thank you, again! Things like this are giving me a whole lot more confidence in the MVVM side of Kendo, your patience with all my questions is very much appreciated :)
Back to Top