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

GridView column property binding

1 Answer 106 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Compeat _
Top achievements
Rank 1
Compeat _ asked on 23 Mar 2010, 08:07 PM

I have been attempting to implement some support for binding GridViewDataColumn headers in XAML and I've run into some confusion over how some of these items are working internally.  I am aware that the GridViewColumnData item is a DependancyObject and not a FrameworkElement and that the {Binding xxxxx} syntax is not specifically supported on properties like 'Header' on DependancyObject in Silverlight.

 

I initially tried to implement a bindable property directly on a subclassed GridViewColumnData but this lead to XAML parsing errors when the {Binding xxxx} syntax was used (but not literal values or static resource references).  This lead me to some SDK documentation that indicated that DependancyObject did not support the syntax (and SetBinding implementation).  This seemed to make sense, except that other elements on the column do support the syntax, specifically the DataMemberBinding property. 

My question is specifically what sort of magic is used under the hood within the Telerik controls to support the binding syntax for DataMemberBinding that I could emulate on additional properties for either 1) a custom property on an inherited  GridViewDataColumn control or 2) a custom attached property on a subclassed RadGridView control.  If this is impossible, then I would be happy with just some explanation of why DataMemberBinding supports the binding syntax and other items will not.


Thanks

1 Answer, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 24 Mar 2010, 08:27 AM
Hello,

DataMemberBinding will work since the property is of type Binding - I believed that binding with latest Silverlight 4 should work for other properties as well.

Best wishes,
Vlad
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.
Tags
GridView
Asked by
Compeat _
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Share this question
or