I am trying (somewhat unsuccessfully) to replicate Context Menu functionality from the ASP.NET version.
Delete
In the older version, it was possible to prompt the user in Javascript before deleting a node and cancel the request:
if (itemText == "Delete")
{
return confirm("Are you sure?");
}
In the Prometheus version, I can ask the question, but the node is deleted irrespective of the answer.
Rename
Although I can edit the Node using F2, I would also like to have a 'Rename' option on a Context Menu. In the ASP.NET version, this was easily accomplished:
if (itemText == "Rename")
{
node.StartEdit();
}
With Prometheus controls, similar code puts the node briefly into edit mode, but then returns to normal almost immediately
Can you let me know how I can get round these problems?
Cheers
paul
When I run the code, it displays item.value = Undefined and item.text = Undefined.
How do I get the value and text from radcombobox?
<script type="text/javascript">
function
templateimageselected(item) {
alert(item.value +
" " + item.text);
}
</script>
<
telerik:RadComboBox id="rcbTemplateImg" runat="server"
Width="100px" Height="115px"
Skin="Vista" DataValueField="TemplateID" DataTextField="TemplateName"
MarkFirstMatch="false" HighlightTemplatedItems="True"
ShowToggleImage="True" AllowCustomText="false"
EnableLoadOnDemand="True"
OnClientSelectedIndexChanging="templateimageselected">
<ItemTemplate>
<table style="width: 375px" class="comboTable" cellspacing="0" cellpadding="0">
<tr>
<td style="width: 125px;" class="comboItemCell">
<div class="comboItem">
<img src='<%# DataBinder.Eval(Container.DataItem, "ThumbnailPath")%>' alt='<%# DataBinder.Eval(Container.DataItem, "TemplateName")%>'/>
<%
# DataBinder.Eval(Container.DataItem, "TemplateName")%>
</div>
</td>
</tr>
</table>
</ItemTemplate>
<CollapseAnimation Duration="200" Type="OutQuint" />
<ExpandAnimation Type="OutQuart" />
</telerik:RadComboBox>

function AjaxRequestButton(arguments)
{
var ajaxManager = $find(<%= RadAjaxManagerProxy1.ClientID %>);
ajaxManager.AjaxRequestWithTarget(
'<%= Button1.UniqueID %>', '');
}
However calling this function generates a runtime error:
'ctl00_toolbarContent_RadAjaxManagerProxy1' is undefined
I've tried moving the proxy to other contect areas of the child page but to no avail. It seems that the javascript function can't locate the proxy.
Any ideas?
I am able to create a web page with the RadAjaxManager using the settings to set the specific control to cause the post and the control to receive the results, and it works as expected.
But if I add a JavaScript reference into the body as below, instead of responding to the Ajax request/response, it seems like the page performs a full refresh (you can see the flash). If I add the reference into the header, I receive all kinds of errors in the Resource Scripts.
What is the appropriate method for adding the JavaScript reference so that it works?
<script language="javascript" type="text/javascript" src="Scripts/EventHandlers.js" />
