I have a GridTemplateColumn in a RadGrid (inplace editing) where the EditItemTemplate contains a user control. The user control is a RadComboBox with an ItemTemplate of a RadTreeview. The user control has a small amount of javascript that gets written out to a RadScriptBlock, the script containing a function to handle the OnClientNodeClicked event of the treeview. Below is that javascript:
function OnTreeviewSelect(sender, args) {
if (args.get_node().get_nodes().get_count() == 0) {
var value = args.get_node().get_value();
var text = args.get_node().get_text();
$find("<%= RadComboBox1.ClientID %>").set_text(text);
}
}
If I do an insert, the control works fine. If I load up the page and try to do an edit first (without attempting an insert), I get a javascript error saying "OnTreeviewSelect" is not a function on the page. If I do an insert, then try to do an edit, I get passed the error about the function not existing, but I get a javscript error saying that the RadComboBox is null. What is the difference between inplace inserting and inplace editing? Why would it always work for inserting and throw various javascript errors when editing?
function OnTreeviewSelect(sender, args) {
if (args.get_node().get_nodes().get_count() == 0) {
var value = args.get_node().get_value();
var text = args.get_node().get_text();
$find("<%= RadComboBox1.ClientID %>").set_text(text);
}
}
If I do an insert, the control works fine. If I load up the page and try to do an edit first (without attempting an insert), I get a javascript error saying "OnTreeviewSelect" is not a function on the page. If I do an insert, then try to do an edit, I get passed the error about the function not existing, but I get a javscript error saying that the RadComboBox is null. What is the difference between inplace inserting and inplace editing? Why would it always work for inserting and throw various javascript errors when editing?