Good day!
I have such a structure of menu:
<telerik:RadMenu ID="RadMenu_Clients" runat="server" OnItemClick="RadMenu_Clients_ItemClick">
<Items>
<telerik:RadMenuItem Text="Профиль" Value="profile" ImageUrl="App_Themes/Theme1/Image/down.png">
<GroupSettings ExpandDirection="Down"></GroupSettings>
<Items>
<telerik:RadMenuItem Text="Настройки аккаунта" Value="settings" />
<telerik:RadMenuItem Text="Данные предприятия" Value="data"/>
<telerik:RadMenuItem Text="Объекты" Value="objects"/>
</Items>
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Заказы" Value="order" ImageUrl="App_Themes/Theme1/Image/down.png">
<GroupSettings ExpandDirection="Down"></GroupSettings>
<Items>
<telerik:RadMenuItem Text="Разместить заказ" Value="set_order"/>
<telerik:RadMenuItem Text="Информация о моих заказах" Value="order_info"/>
</Items>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
when I click an MenuItem I want to get all of it's child items if it's a first level item and if it's a second level item I want to det it's parent and after that - all of the parent's children items and add them to enother RadMenu.
I try to do it using Owner and Items properties.
When I try to read First_Level_Item.Items using foreach I have an error "First_Level_Item.Items collection was changed " after first step in foreach =(
what can I do to solve this problem?
I have such a structure of menu:
<telerik:RadMenu ID="RadMenu_Clients" runat="server" OnItemClick="RadMenu_Clients_ItemClick">
<Items>
<telerik:RadMenuItem Text="Профиль" Value="profile" ImageUrl="App_Themes/Theme1/Image/down.png">
<GroupSettings ExpandDirection="Down"></GroupSettings>
<Items>
<telerik:RadMenuItem Text="Настройки аккаунта" Value="settings" />
<telerik:RadMenuItem Text="Данные предприятия" Value="data"/>
<telerik:RadMenuItem Text="Объекты" Value="objects"/>
</Items>
</telerik:RadMenuItem>
<telerik:RadMenuItem Text="Заказы" Value="order" ImageUrl="App_Themes/Theme1/Image/down.png">
<GroupSettings ExpandDirection="Down"></GroupSettings>
<Items>
<telerik:RadMenuItem Text="Разместить заказ" Value="set_order"/>
<telerik:RadMenuItem Text="Информация о моих заказах" Value="order_info"/>
</Items>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
when I click an MenuItem I want to get all of it's child items if it's a first level item and if it's a second level item I want to det it's parent and after that - all of the parent's children items and add them to enother RadMenu.
I try to do it using Owner and Items properties.
When I try to read First_Level_Item.Items using foreach I have an error "First_Level_Item.Items collection was changed " after first step in foreach =(
what can I do to solve this problem?