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

Problems Binding ControlPanelItem

1 Answer 101 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Hung
Top achievements
Rank 1
Hung asked on 09 Dec 2013, 04:10 PM
I want a binding ICommand to the Click event of a button in ControlPanelitem. But it does not work. And I Binding SelectedValue of RadDatePicker control in ControlPanelItem and it also does not work. ControlPanelItem support from the model not binding?

1 Answer, 1 is accepted

Sort by
0
luc
Top achievements
Rank 1
answered on 30 Apr 2014, 04:37 PM
Hi,

The DataContext of ControlPanelItem don't inherited from your gridview DataContext. You can found your command with a RelativeSource.

Command="{Binding Path=DataContext.MyCommand, RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type telerik:RadGridView}}}"

Regards
Luc
Tags
GridView
Asked by
Hung
Top achievements
Rank 1
Answers by
luc
Top achievements
Rank 1
Share this question
or