Sync SelectedItems to GridView

2 posts, 0 answers
  1. christina noel
    christina noel avatar
    42 posts
    Member since:
    Mar 2010

    Posted 07 Oct 2011 Link to this post

    I am trying to sync my tileview selected items with gridview selected items. They are both bound to the same QueryableCollectionView, if that helps. Both of them have Extended selections, and the gridview has a GridViewSelectColumn, in addition to being click-to-select.

    I have seen two ways, scattered through the help and support, of binding selectedItems. The first uses Behaviors (as in this Blog Post), and the second uses ContainerBindings.

    On the one hand, It seems like the behavior is gridview-specific, but I can't be sure since I think some of the code is missing from the blog post. (There's a "..." at the end of the source code display that seems to be cutting out functions.)

    On the other hand, I'm not sure where to attach containerbindings to the tileview, or if I can attach containerbindings to the gridview at all.

    I'd really appreciate some help in getting this to work.


  2. Petar Mladenov
    Petar Mladenov avatar
    2991 posts

    Posted 12 Oct 2011 Link to this post

    Hello Christina Noel,

     Please first examine this forum post where it is explained how to synchronize selection between 2 RadGridViews. Unfortunately, you cannot implement this synchronization ( TileView SelectedItems <--> GridView SelectedItems) out of the box. You will have to do this in code behind in the Selection Changed event handlers.
    You can check the attached project showing how to use ContainerBindings in RadTileView in order to bind the SelectedItems from the ViewModel. You may also extend this application to use the SelectionChanged event in the TileView and set the selected rows in a corresponding GridView.
    Please let us know if you need more info on this. 

    All the best,
    Petar Mladenov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

Back to Top