<script type="text/javascript"> function setEmpty() { var combo = $find("<%= combo1.ClientID %>"); combo.clearselection(); combo.set_emptyMessage("select please"); } function nodeClicking(sender, args) { var comboBox = $find("<%= combo1.ClientID %>"); var node = args.get_node() comboBox.set_text(node.get_text()); comboBox.trackChanges(); comboBox.get_items().getItem(0).set_text(node.get_text()); comboBox.get_items().getItem(0).set_value(node.get_value()); comboBox.commitChanges(); comboBox.hideDropDown(); // Call comboBox.attachDropDown if: // 1) The RadComboBox is inside an AJAX panel. // 2) The RadTreeView has a server-side event handler for the NodeClick event, i.e. it initiates a postback when clicking on a Node. // Otherwise the AJAX postback becomes a normal postback regardless of the outer AJAX panel. //comboBox.attachDropDown(); } function StopPropagation(e) { if (!e) { e = window.event; } e.cancelBubble = true; } function OnClientDropDownOpenedHandler(sender, eventArgs) { var tree = sender.get_items().getItem(0).findControl("rvt1"); var selectedNode = tree.get_selectedNode(); if (selectedNode) { selectedNode.scrollIntoView(); } } </script><telerik:RadComboBox ID="combo1" runat="server" CausesValidation="false" EnableEmbeddedSkins="false" OnClientDropDownOpened="OnClientDropDownOpenedHandler" EmptyMessage="select please" MaxHeight="200px" ShowToggleImage="True" Width="50%" AllowCustomText="True"> <ItemTemplate> <div id="div1"> <telerik:RadTreeView ID="rvt1" runat="server" Width="100%" Height="250px" DataSourceID="ds1" DataFieldID="ID" DataValueField="ID" DataFieldParentID="ParentID" DataTextField="Name" OnClientNodeClicking="nodeClicking" > <DataBindings> <telerik:RadTreeNodeBinding Expanded="true" /> </DataBindings> </telerik:RadTreeView> </div> </ItemTemplate> <Items> <telerik:RadComboBoxItem Text="" /> </Items></telerik:RadComboBox><asp:ObjectDataSource ID="ds2" runat="server" EnablePaging="True" OnSelecting="dds2_Selecting" SelectMethod="GetList" TypeName="BLL"> <SelectParameters> <asp:Parameter Name="p1" Type="Int32" /> <asp:Parameter Name="p2" Type="Int32" /> <asp:Parameter Name="p3" Type="Boolean" DefaultValue="True" /> </SelectParameters></asp:ObjectDataSource>RadPanelItem myPanelItem = new RadPanelItem("First item")myPanelBar.Items.Add(myPanelItem);RadPanelItem myPanelItem = new RadPanelItem("First item")Button btn = new Button();btn.Text = "Test";myPanelItem.Header.Controls.Add(btn);myPanelBar.Items.Add(myPanelItem);| ClientScriptManager cs = this.Page.ClientScript; |
| Type rsType = this.GetType(); |
| cs.RegisterClientScriptInclude("JobScript", cs.GetWebResourceUrl(rsType, "CareerCenter_Classes.JsScripts.Jobs.js")); |
Hi there
I am having issues with using the RadAjaxManager and the client events. I can only use the following 2:
OnRequestStart and OnResponseEnd
<telerik:RadAjaxManager ID="RadAjaxManager" runat ="server">
<ClientEvents OnRequestStart="startRequest" OnResponseEnd="endResponse">
</telerik:RadAjaxManager>
I need to use the following ClientEvents but they don't appear:
OnRequestSent and OnResponseReceived
Issue that is occuring is that upon an error occuring within the build and an exception being thrown doesn't invoke the OnResponseEnd="endResponse" and thus my function endResponse doesn't run
function endResponse(sender, eventArgs)
{
parent.enableTabs();
}
So I would like to use the onResponseRecieved so that even if an exception is thrown onResponseRecieved will still run a function
<telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
<ClientEvents OnRequestStart="startRequest" OnResponseEnd="endResponse" OnResponseReceived="receiveResponse"/>
</telerik:RadAjaxManager >
function receiveResponse(sender, eventArgs)
{
parent.enableTabs();
}
I was wondering if it could be down to the Telerik.Web.UI.dll we are using as version is 2009.02.0826.20
Any responses or help are greatly appreciated!