Binding grid property to Application Settings

2 posts, 0 answers
  1. Neil Mercer
    Neil Mercer avatar
    18 posts
    Member since:
    Sep 2009

    Posted 29 Jul 2013 Link to this post

    Hi,

    I'm new to WPF development, and am wanting to see if it is possible to bind properties of the RadGridView (such as CanUserSortColumns) to application settings?  i.e. I have defined a set of application settings such as AllowSorting, AllowGrouping etc, and it seems I should be able to bind the relevant properties on RadGridView to these settings, but I don't know how.

    Any help appreciated,
    Neil.
  2. Dimitrina
    Admin
    Dimitrina avatar
    3769 posts

    Posted 31 Jul 2013 Link to this post

    Hi,

    You can bind the value f the CanUserSortColumn property. If the setting is not defined in the DataContext of the RadGridView, then you will need to specify a valid Source for the Binding.

    CanUserSortColumns="{Binding CanUserSort, Source={StaticResource MyViewModel}}"

    I hope this helps.

    Regards,
    Didie
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for WPF.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
Back to Top