This question is locked. New answers and comments are not allowed.
Hello,
Can you give me any advice how can I pass parameter value to Telerik Window?
I have the following case. I'm using Telerik TreeView (treeview of users hierarchy) and I'm trying to create a context menu (I didn't found telerik context menu). From the context menu I can create new nodes to the TreeView (new users), so when I select to add new user from the context menu a Telerik Window opens. I must pass a value to that window that indicates to what node I must add new node. Here is a piece of my code:
The .content(selectedUser) function is not working for me because it's deleting my previous content in the Window. So how can I pass the selected user from the TreeView to the Window?
Here is the jquery context menu:
Can you give me any advice how can I pass parameter value to Telerik Window?
I have the following case. I'm using Telerik TreeView (treeview of users hierarchy) and I'm trying to create a context menu (I didn't found telerik context menu). From the context menu I can create new nodes to the TreeView (new users), so when I select to add new user from the context menu a Telerik Window opens. I must pass a value to that window that indicates to what node I must add new node. Here is a piece of my code:
//the telerik windowHtml.Telerik().Window().Name("WindowUser").Title("Add new user").Content(@<text> @Html.Partial("~/Views/Shared/_UserePartial.cshtml")</text>).Render();The .content(selectedUser) function is not working for me because it's deleting my previous content in the Window. So how can I pass the selected user from the TreeView to the Window?
Here is the jquery context menu:
var selectedUser = ''; //contains the selected user from the treeview var menuUser = [ { 'Option 1': function (menuItem, menu) { alert($(menuItem).html()); } }, $.contextMenu.separator, { 'New User': function (menuItem, menu) { $('#WindowUser').data('tWindow').content(selectedUser).center().open(); } }];//add the context menu to the treeview nodes jQuery(function ($) { $('.menuFranchise').contextMenu(menuUser, { theme: 'vista' }); });//gets the selected user from the treeviewfunction onTreeViewSelect(userName) { selectedUser = userName;}