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

ItemsRequested not work correctly

2 Answers 93 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Camila Foltran
Top achievements
Rank 1
Camila Foltran asked on 30 Dec 2011, 01:50 PM
I am using server side code to populate the combobox. and enabled "EnableLoadOnDemand"
The combobox doesnt seem working correctly. When the page first opens, click into the combobox nothing hapens and it is not populated. When I type in something or delete what i typed in then it populates. I tried to change the code to as simple as assigning a datatable to the combobox datasource still no luck..
why? what I do?

2 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 30 Dec 2011, 08:42 PM
Camila:

Can you tell us what browser you are using to test this? There does appear to be some open issues related to Internet Explorer 9 (see here).

Would it be possible for you to post your form definition and server-side code? This would help in identifying what is going wrong here.

Regards,
0
Princy
Top achievements
Rank 2
answered on 02 Jan 2012, 06:12 AM
Hello,

I have tried to reproduce the issue but no avail. Here is the code I have tried.
ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="true" AutoPostBack="true" LoadingMessage="Loading.." MarkFirstMatch="true" AutoCompleteSeparator="," OnItemsRequested="RadComboBox_ItemsRequested">
</telerik:RadComboBox>

CS:
protected void RadComboBox_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
    {
        SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ToString());
        String s = "select FirstName,EmployeeID from Employees";
        con.Open();
        SqlDataAdapter dr = new SqlDataAdapter(s, con);
        DataTable dt = new DataTable();
        dr.Fill(dt);
        con.Close();
        RadComboBox1.DataSource = dt;
        RadComboBox1.DataTextField = "FirstName";
        RadComboBox1.DataValueField = "EmployeeID";
        RadComboBox1.DataBind();
    }
Note: Make sure that you have tried with the version which supports the latest browser.

Hope it helps.
Thanks,
Princy.
Tags
ComboBox
Asked by
Camila Foltran
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or