This question is locked. New answers and comments are not allowed.
Hi,
we need to call gird.ExpandAllHierarchyItems method to expand all through a button which is out of gird control. currently we adopt mvvm pattern, we dont want to add event code to code behind. Is this possible to add control in gird for make it call gird event by MVVM?
I've tested commandparameter in i:triggers in out side buttons by
Any suggestions? thank you in advanced.
UI.xaml:
Ui.cs
only to bind the viewmodel
ViewModel.cs
we need to call gird.ExpandAllHierarchyItems method to expand all through a button which is out of gird control. currently we adopt mvvm pattern, we dont want to add event code to code behind. Is this possible to add control in gird for make it call gird event by MVVM?
I've tested commandparameter in i:triggers in out side buttons by
- {binding}
- {bingding
RadTreeListView
, ElementName = radTreeListView }
Any suggestions? thank you in advanced.
UI.xaml:
<
telerik:RadButton
Content
=
"{Binding ResourceStrings.LBL_EXPAND_ALL_TITLE, Source={StaticResource LocalizedStrings}}"
Style
=
"{StaticResource NormalButtonStyle}"
Grid.Column
=
"1"
>
<
i:Interaction.Triggers
>
<
i:EventTrigger
EventName
=
"Click"
>
<
i:InvokeCommandAction
Command
=
"{Binding ExpandAllCommand, Source={StaticResource ViewModel}}"
CommandParameter
=
"{Binding}"
/>
</
i:EventTrigger
>
</
i:Interaction.Triggers
>
</
telerik:RadButton
>
<
telerik:RadTreeListView
x:Name
=
"radTreeListView"
ItemsSource
=
"{Binding BPMLEntities,Mode=TwoWay}"
Style
=
"{StaticResource CommonTreeListViewStyle}"
>
</
telerik:RadTreeListView
>
Ui.cs
only to bind the viewmodel
ViewModel.cs
public
void
HandleExpandAllCommand(
object
obj)
{
}