Hi,
I have a radTreeView defined with its context menu in resources::
I want to access the context menu to change the headers of the items depending on the country.
Can you help me, please? I'm using VB.NET
Thanks
I have a radTreeView defined with its context menu in resources::
<
UserControl.Resources
>
<
sampleData:c_treeViewData
x:Key
=
"DataSource"
/>
<
Style
x:Key
=
"ItemContainerStyle"
TargetType
=
"telerik:RadTreeViewItem"
>
<
Setter
Property
=
"IsExpanded"
Value
=
"True"
/>
</
Style
>
<
DataTemplate
x:Key
=
"ItemEditTemplate"
>
<
Grid
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBox
Text
=
"{Binding Name, Mode=TwoWay}"
/>
</
StackPanel
>
</
Grid
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"c_proprietyValue"
>
<
TextBlock
Text
=
"{Binding Name}"
FontSize
=
"14"
TextWrapping
=
"Wrap"
Width
=
"200"
/>
</
DataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"c_proprietyType"
ItemTemplate
=
"{StaticResource c_proprietyValue}"
ItemsSource
=
"{Binding propretyValues}"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"{Binding Image}"
Margin
=
" 0,0,6,0"
Height
=
"20"
Width
=
"20"
/>
<
TextBlock
Text
=
"{Binding Name}"
FontWeight
=
"Bold"
FontSize
=
"14"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
Name
=
"rcm_context1"
Opened
=
"RadContextMenu_Opened"
>
<
telerik:RadMenuItem
Name
=
"Delete"
Header
=
"Delete"
/>
<
telerik:RadMenuItem
Name
=
"Contraer"
Header
=
"Collapse tree"
/>
<
telerik:RadMenuItem
Name
=
"Expandir"
Header
=
"Expand tree"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
</
TextBlock
>
</
StackPanel
>
</
HierarchicalDataTemplate
>
<
HierarchicalDataTemplate
x:Key
=
"c_block"
ItemTemplate
=
"{StaticResource c_proprietyType}"
ItemsSource
=
"{Binding propretyTypes}"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
Image
Source
=
"{Binding Image}"
Margin
=
" 0,0,6,0"
Height
=
"20"
Width
=
"20"
/>
<
TextBlock
Text
=
"{Binding Name}"
FontWeight
=
"Bold"
FontSize
=
"16"
HorizontalAlignment
=
"Stretch"
>
<
telerik:RadContextMenu.ContextMenu
>
<
telerik:RadContextMenu
Opened
=
"RadContextMenu_Opened"
>
<
telerik:RadMenuItem
Name
=
"Rename"
Header
=
"Rename"
/>
<
telerik:RadMenuItem
Name
=
"Delete"
Header
=
"Delete"
/>
<
telerik:RadMenuItem
Name
=
"Contraer"
Header
=
"Collapse tree"
/>
<
telerik:RadMenuItem
Name
=
"Expandir"
Header
=
"Expand tree"
/>
</
telerik:RadContextMenu
>
</
telerik:RadContextMenu.ContextMenu
>
</
TextBlock
>
</
StackPanel
>
</
HierarchicalDataTemplate
>
</
UserControl.Resources
>
I want to access the context menu to change the headers of the items depending on the country.
Can you help me, please? I'm using VB.NET
Thanks