This question is locked. New answers and comments are not allowed.
Hi,
I’m developing a Gridview application in Silverlight, where i’ve got inside a CellEditTemplate with a RadComboBox. I need to call specific method in my ViewModel when i click in my RadComboBox. How can i redefine again my context to fin the method, because with my code (below), I’ve the error that say my RadGridView ItemSource do not contains my method.
Anyone can help me?
Thanks
Regards
<
telerik:RadGridView
x:Name
=
"myPrdContent"
ItemsSource
=
"{Binding ResultSearch2}"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"False"
IsFilteringAllowed
=
"False"
>
<
telerik:RadGridView.Columns
>
<
telerik:GridViewDataColumn
DataMemberBinding
=
"{Binding Age}"
Width
=
"*"
MinWidth
=
"200"
>
<
telerik:GridViewDataColumn.Header
>
<
Grid
>
<
Grid.RowDefinitions
>
<
RowDefinition
/>
<
RowDefinition
/>
</
Grid.RowDefinitions
>
<
TextBlock
Margin
=
"2"
Text
=
"Age"
Grid.Row
=
"0"
/>
</
Grid
>
</
telerik:GridViewDataColumn.Header
>
<
telerik:GridViewDataColumn.CellEditTemplate
>
<
DataTemplate
>
<
telerik:RadComboBox
x:Name
=
"RadComboBox1"
Margin
=
"0 10 0 10"
VerticalAlignment
=
"Center"
CanAutocompleteSelectItems
=
"False"
CanKeyboardNavigationSelectItems
=
"False"
IsEditable
=
"True"
IsReadOnly
=
"False"
OpenDropDownOnFocus
=
"False"
IsFilteringEnabled
=
"False"
TextSearchMode
=
"Contains"
IsDropDownOpen
=
"False"
EmptyText
=
"...::Empty::.."
SelectedValue
=
"{Binding SearchLibelle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Text
=
"{Binding SearchLibelle, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"
Width
=
"300"
DataContext
=
"{Binding}"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"DropDownOpened"
>
<
ei:CallMethodAction
MethodName
=
"Search"
TargetObject
=
"{Binding DataContext, ElementName=RadComboBox1}"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
telerik:RadComboBox
>
</
DataTemplate
>
</
telerik:GridViewDataColumn.CellEditTemplate
>
</
telerik:GridViewDataColumn
>
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>