This is a migrated thread and some comments may be shown as answers.
Overlapping text on user input
3 Answers 10 Views
This is a migrated thread and some comments may be shown as answers.
Gabriele
Top achievements
Rank 1
Gabriele asked on 11 Feb 2014, 10:28 AM
Hello,

I use a Combobox with autocomplete and load on demand which works perfectly fine and usually the fiels is pre-selected.
However, if the fiels is empty the following Scenario happens:

- first click, Cursor is at the beginning of the box, everything is fine.
- second click in the box - the Cursor jumps to the left upper Corner and it's size is reduced.

This leads to the following Problem:
- first click, Cursor okay, user types a text, text is fine
- second click, text is still in the box, it is not cleared - the Cursor jumps to the left upper Corner again, get's reduced in size and if the user starts typing a text now the previous text is not deleted or anything, the two texts overlap. On Validation the combox behaves like there as been no user-Input at all.

I've attached a screenshot to make it clearer.

Any help would be appreciated.

3 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 1
answered on 12 Feb 2014, 10:52 AM
Hi Gabriele,

Unfortunately I couldn't replicate the issue at my end. Please have a look into the following sample code snippet which works fine at my end and let me know if you have any concern.

ASPX:
<telerik:RadComboBox ID="RadComboBox1" runat="server" EnableLoadOnDemand="true" DataTextField="Text"
    DataValueField="Value" OnItemsRequested="RadComboBox1_ItemsRequested">
</telerik:RadComboBox>

C#:
protected void RadComboBox1_ItemsRequested(object sender, Telerik.Web.UI.RadComboBoxItemsRequestedEventArgs e)
{
    Telerik.Web.UI.RadComboBox combo = (Telerik.Web.UI.RadComboBox)sender;
    String connstring = WebConfigurationManager.ConnectionStrings["NorthwindConnectionString"].ConnectionString;
    SqlConnection conn = new SqlConnection(connstring);
    SqlDataAdapter adapter = new SqlDataAdapter();
    adapter.SelectCommand = new SqlCommand("SELECT * from Customers WHERE CompanyName LIKE '" + e.Text + "%'", conn);
    DataTable data = new DataTable();
    conn.Open();
    try
    {
        adapter.Fill(data);
    }
    finally
    {
        conn.Close();
    }
    foreach (DataRow row in data.Rows)
    {
        Telerik.Web.UI.RadComboBoxItem item = new Telerik.Web.UI.RadComboBoxItem(row["CompanyName"].ToString());
        combo.Items.Add(item);
    }
}

Thanks,
Shinu.
0
Gabriele
Top achievements
Rank 1
answered on 12 Feb 2014, 12:22 PM
Hi,

obviously my attachement got lost at the first post. I'll try it again.
I don't have any Problems with drop-down or with the items there, that works perfectly fine and excatly as expected. The problem I have is focused solemny on the user Input - meaning when the user types something in the box. As long as the Cursor is where it is expected to be the autocomplete works fine. When it jumps to said Corner it starts overlapping the text.
0
Boyan
Top achievements
Rank 1
answered on 14 Feb 2014, 02:33 PM
Hello Gabriele,

I would like to clarify that I am not able to replicate such an issue when typing in the RadComboBox control. I tried your suggestion to type and click in the input field and start typing again but with no success. Could you please provide a video that shows the exact steps of reproducing this issue. For capturing a video I would suggest using the Jing software that is free service for capturing screenshots and videos and sharing them on the web. Please clarify what version of Telerik controls you are using and please share the RadComboBox markup code.

Regards.
Asked by
Gabriele
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 1
Gabriele
Top achievements
Rank 1
Boyan
Top achievements
Rank 1
Share this question
or