RadGridView SelectionMode Binding Does Not Work

6 posts, 0 answers
  1. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 19 Dec 2014 Link to this post

    I have a SelectionMode Type Property in my ViewModel.  I have that bound to the SelectionMode of a GridView.  I am using INotify, but it doesn't appear that the GridView has any connection to that Property.  I don't get any errors, it just doesn't work.  I have lots of bindings to other things in the XAML that all work fine, so is there a problem trying to bind that particular property?
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Dec 2014 Link to this post

    Hello,

    Generally the reason why the Binding does not work would be that that the Source of it cannot be resolved. You can try defining the ViewModel as a StaticResource and then set it as a Source for the Binding of child RadGridView. You can also check the Binding.Source Property as a reference.

    Let me know if this works fine.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  3. DevCraft banner
  4. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 22 Dec 2014 in reply to Dimitrina Link to this post

    I have several other bindings for that grid, in the same view model as the one I am trying to use for SelectionMode and they all work fine.
  5. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 22 Dec 2014 Link to this post

    Hello,

    It should also work fine even when the Source is not explicitly set. I attached a demo project for a reference.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
  6. Stephen
    Stephen avatar
    21 posts
    Member since:
    Dec 2013

    Posted 30 Dec 2014 in reply to Dimitrina Link to this post

    I see where you created a binding property, then put that in your xaml, but your triggering event is still the user in the code behind.  I need a way to change that value programmatically from the View Model (no user interaction).  I have events in my code behind right now, which do cause the state to change, but if I try to do it from my view model, nothing happens.
  7. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 31 Dec 2014 Link to this post

    Hello,

    May I ask you to try isolating the issue in a demo project illustrating your exact setup and attach it in a new support ticket ? You can also take a look at this blog post for a reference on how to isolate an issue. 

    That way I can check it locally and advise further.

    Regards,
    Dimitrina
    Telerik
     

    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

     
Back to Top
DevCraft banner