This is a migrated thread and some comments may be shown as answers.

RadComboBox inside Radtooltip datasource not updating

3 Answers 84 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Zubair
Top achievements
Rank 1
Veteran
Zubair asked on 19 Jan 2020, 10:23 AM

When specific condition met i am giving datasource to combobox and for the first time it binds and item are showing in the combox.. but the problem is when i am trying to bind again with different datasource it get stuck. Item are not showing in combobox.

asp code:

<asp:Label ID="Label1" runat="server" Text="" Visible="false"><img src="../../../Resources/images/dependent16x16(2).png" alt="dependent" /></asp:Label>
                         <telerik:RadToolTip RenderMode="Lightweight" ID="RadToolTip1" runat="server" TargetControlID="Label1" Width="320px"
                          RelativeTo="Element" Position="MiddleRight" HideEvent="ManualClose" EnableRoundedCorners="true" OffsetX="2"
                          EnableShadow="true" ShowEvent="OnMouseOver" >
                            <asp:Literal ID="Literal36" runat="server" Text="Dependents"></asp:Literal>            
                            <telerik:RadComboBox ID="cmbDependent" runat="server" MarkFirstMatch="true" RenderMode="Lightweight" AllowCustomText="false"  Width="220px" EmptyMessage="Select Dependent"
                             OnSelectedIndexChanged="cmbDependent_SelectedIndexChanged" AutoPostBack="true" ZIndex="50001" >
                            </telerik:RadComboBox>
                         </telerik:RadToolTip>

 

C# binding function

private void BindDependents()
        {
            cmbDependent.ClearSelection();
            cmbDependent.DataSource = objMedicalInsuranceRepository.GetDependent(txtStaffNo.Text.Trim());
            cmbDependent.DataValueField = "VALUE";
            cmbDependent.DataTextField = "NAME";
            cmbDependent.DataBind();
        }

 

my query:

public DataTable GetDependent(string pBadgeNo)
        {
            query = "SELECT S_S_N VALUE,INITCAP(FIRST_NAME||' '||IFSAPP.COMPANY_PERSON_API.GET_NAME('990',PERSON_ID))||' - '||RELATIONSHIP_TYPE NAME FROM "+
                    "IFSAPP.EMPLOYEE_DEPENDENT_TAB WHERE PERSON_ID ='" + pBadgeNo + "'";
 
            return objDBHelper.ExecuteDataTable(query);
        }

 

 

please help.. 

3 Answers, 1 is accepted

Sort by
0
Rumen
Telerik team
answered on 21 Jan 2020, 01:27 PM

Hi Zubair,

Do you get any JavaScript or Server errors when the stuck problem happen? Press F12 in the browser and look for errors in the console? 

If the control is ajaxified in an asp:UpdatePanel or RadAjaxPanel/RadAjaxManager, exclude it from the UpdatePanel or disable the Ajax of RadAjax components by setting EnableAjax="false" and re-test.

Also do you experience the problem with a regular asp:DropDownList or the Telerik RadDropDownList?

Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
0
Zubair
Top achievements
Rank 1
Veteran
answered on 21 Jan 2020, 01:55 PM

Dear Rumen,
I removed the radtooltip and then radcombobox worked fine.

And yes when stuck was happening i have many error in console. I searched it but didn't get any solution so i just removed the radtooltip which was causing this. And yes it was under RadAjaxPanel.
I think the problem inside radtooltip is related to postback. I will try your suggestion and also tell me on which control i should put EnableAjax=false

Thanks for your support :)

0
Rumen
Telerik team
answered on 21 Jan 2020, 02:02 PM

Hi Zubair,

I am glad you found the reason for the problem!

The EnableAjax is a property of RadAjaxManager and RadAjaxPanel

<telerik:RadAjaxManager ... EnableAJAX="false">
<telerik:RadAjaxPanel ... EnableAJAX="false">

You can find more details for it at this KB article: Get more descriptive errors by disabling AJAX.


Best Regards,
Rumen
Progress Telerik

Get quickly onboarded and successful with UI for ASP.NET AJAX with the Virtual Classroom technical trainings, available to all active customers. Learn More.
Tags
ComboBox
Asked by
Zubair
Top achievements
Rank 1
Veteran
Answers by
Rumen
Telerik team
Zubair
Top achievements
Rank 1
Veteran
Share this question
or