Hi,
I am using RadAjaxManager to update dropdown and tooltip but the problem is that when I update the dropdown it halts and I can not open the dropdown. Any help would be greatly appreciated.
I am using RadAjaxManager to update dropdown and tooltip but the problem is that when I update the dropdown it halts and I can not open the dropdown. Any help would be greatly appreciated.
<
telerik:RadComboBox
ID
=
"rcbTemplate"
AutoPostBack
=
"true"
Height
=
"200px"
runat
=
"server"
>
</
telerik:RadComboBox
>
<
asp:LinkButton
ID
=
"btnAddTemplates"
Text
=
"Add/Edit Template"
Visible
=
"false"
runat
=
"server"
>
</
asp:LinkButton
>
<
telerik:RadAjaxManager
ID
=
"_RadAjaxManager"
OnAjaxRequest
=
"rjm_AjaxRequest"
runat
=
"server"
>
<
AjaxSettings
>
<
telerik:AjaxSetting
AjaxControlID
=
"btnSave"
>
<
UpdatedControls
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rttm"
></
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rcbTemplate"
></
telerik:AjaxUpdatedControl
>
<
telerik:AjaxUpdatedControl
ControlID
=
"rgInvoiceTemplateDetail"
></
telerik:AjaxUpdatedControl
>
</
UpdatedControls
>
</
telerik:AjaxSetting
>
</
AjaxSettings
>
</
telerik:RadAjaxManager
>
<
telerik:RadToolTipManager
ID
=
"rttm"
runat
=
"server"
Position
=
"TopRight"
Animation
=
"Fade"
ShowEvent
=
"OnClick"
HideEvent
=
"ManualClose"
OnAjaxUpdate
=
"OnAjaxUpdate"
RelativeTo
=
"Element"
Width
=
"250px"
Height
=
"250px"
RenderInPageRoot
=
"true"
>
<
TargetControls
>
<
telerik:ToolTipTargetControl
TargetControlID
=
"btnAddTemplates"
/>
</
TargetControls
>
</
telerik:RadToolTipManager
>
<
table
id
=
"tblToolTip"
visible
=
"false"
runat
=
"server"
>
<
tr
>
<
td
>
Client
</
td
>
<
td
>
<
asp:Label
ID
=
"lblClientName"
runat
=
"server"
></
asp:Label
>
</
td
>
</
tr
>
<
tr
>
<
td
>
Template
</
td
>
<
td
>
<
asp:TextBox
ID
=
"txtTemplateName"
runat
=
"server"
></
asp:TextBox
>
</
td
>
</
tr
>
<
tr
>
<
td
>
</
td
>
<
td
>
<
asp:Button
ID
=
"btnSave"
OnClientClick
=
"SaveTemplate(this); return false;"
Text
=
"Save"
runat
=
"server"
/>
</
td
>
</
tr
>
</
table
>
Protected Sub rjm_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs)
Dim nTemplateID As Int32 = Convert.ToInt32(rcbTemplate.SelectedValue)
Dim objTemplate As New TemplateInfo(nTemplateID)
objTemplate.TemplateName = txtTemplateName.Text.Trim
objTemplate.Update(nTemplateID)
ScriptManager.RegisterClientScriptBlock(Me.Page, Me.GetType(), "Call my function", "CloseActiveToolTip()", True)
Call GetAllTemplates()
End Sub
Protected Sub GetAllTemplates()
rcbTemplate.Items.Clear()
If rcbClient.SelectedValue <> String.Empty Then
Dim sSQL As String = "select ID, TemplateName from InvoiceTemplate where IsDeleted = 0 and ClientID = " & rcbClient.SelectedValue & " order By TemplateName"
Dim oDataTable As DataTable = GMSDB.Query(sSQL)
rcbTemplate.DataSource = oDataTable
rcbTemplate.DataTextField = "TemplateName"
rcbTemplate.DataValueField = "ID"
rcbTemplate.DataBind()
rcbTemplate.Items.Insert(0, New RadComboBoxItem("- Select Template -", "- Select Template -"))
Else
rcbTemplate.DataSource = Nothing
rcbTemplate.DataBind()
rcbTemplate.Items.Add(New RadComboBoxItem("- Select Template -", "- Select Template -"))
End If
End Sub