Can RadGridView columns be placed in a ResourceDirectory assigned to the GridViewColumnCollection or does one have to use a control template to accomplish this?
Thanks.
2 Answers, 1 is accepted
0
Pavel Pavlov
Telerik team
answered on 18 Feb 2010, 01:01 PM
Hello Larry,
I believe the single possible solution is to place a columns collection in your resources like :
After that unfortunatelly there is not pure XAML solution. Instead you should do the following in codebehind.
get the resource as GridViewColumnCollection,
add the columns in the GridViewColumnCollection to RadGridView.Columns ( e.g. usng the RadGridView.Columns.AddRange method) .
Greetings,
Pavel Pavlov
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Thanks for the reply. It would be very useful though if one could define different column configurations as you demonstrated, then swap them in and out via triggers in XAML. It would then be easy to assign different datasources to the same RadGridView and custom tailor the columns in XAML.