Hi all,
I've just started using the Telerik controls and I'm looking for some advice on how to achieve the requirement below.
I'd like the user to be able to choose a 'Create' option from a context menu on a tree view node.
On selecting this option, I'd like to display a Telerik Window to enable the user to create a new record. If this is too difficult, I'm happy for this to be some other UI element and I'm open to suggestion here.
On saving the record, I'd like to add the newly created item into the tree node.
1. Are there any code samples on how to open up a Window or form from a context menu item?
2. I'm trying to figure out the code that's needed to add items into the treeview and I'm following the article beneath.
http://www.telerik.com/help/aspnet-ajax/treeview-general-add-node-in-edit-mode-by-default.html
When I add the following javascript into my page, I get the following error when loading the page.
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I’m not sure if this is relevant but I've added a RadAjaxManager onto my page and am using the code beneath in the AddNode method.
Any help or guidance would be much appreciated.
Tim
I've just started using the Telerik controls and I'm looking for some advice on how to achieve the requirement below.
I'd like the user to be able to choose a 'Create' option from a context menu on a tree view node.
On selecting this option, I'd like to display a Telerik Window to enable the user to create a new record. If this is too difficult, I'm happy for this to be some other UI element and I'm open to suggestion here.
On saving the record, I'd like to add the newly created item into the tree node.
1. Are there any code samples on how to open up a Window or form from a context menu item?
2. I'm trying to figure out the code that's needed to add items into the treeview and I'm following the article beneath.
http://www.telerik.com/help/aspnet-ajax/treeview-general-add-node-in-edit-mode-by-default.html
When I add the following javascript into my page, I get the following error when loading the page.
function
HighlightNode(value) {
var
tree = $find(
"<%= RadTreeView1.ClientID %>"
);
var
node = tree.findNodeByValue(value);
if
(node !=
null
) {
node.startEdit();
}
}
The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Web.HttpException: The Controls collection cannot be modified because the control contains code blocks (i.e. <% ... %>).
I’m not sure if this is relevant but I've added a RadAjaxManager onto my page and am using the code beneath in the AddNode method.
Dim
script
As
String
=
"HighlightNode("
""
+ newNode.Value +
""
")"
RadAjaxManager1.ResponseScripts.Add(script)
Any help or guidance would be much appreciated.
Tim