This is a migrated thread and some comments may be shown as answers.

Binding grid property to Application Settings

1 Answer 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Neil Mercer
Top achievements
Rank 1
Neil Mercer asked on 30 Jul 2013, 04:56 AM
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.

1 Answer, 1 is accepted

Sort by
0
Dimitrina
Telerik team
answered on 31 Jul 2013, 07:32 AM
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 >>
Tags
GridView
Asked by
Neil Mercer
Top achievements
Rank 1
Answers by
Dimitrina
Telerik team
Share this question
or