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

Text cutting off

6 Answers 769 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Robert
Top achievements
Rank 1
Robert asked on 19 Jun 2014, 01:12 PM
The text for my selected items in a MultiColumn ComboBox are getting cut off.  I had a similar problem with the DropDownList control.  To fix that problem, I set the SelectionLength = 0 after assigning the SelectedValue.

6 Answers, 1 is accepted

Sort by
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 24 Jun 2014, 07:53 AM
Hello Robert,

Thank you for writing.

We had a known issue in our RadDropDownList related to cutting off the text. This issue was already fixed in Q3 2013 and it is not reproducible in the latest version.
Similar problem was available in the RadMulticolumnComboBox. However, its fix was introduced in Q1 2014 SP1.
I would like to note that both of the issues can not be replicated in the latest release - Q2 2014.
Here is a sample code snippet, demonstrating how to avoid the undesired behavior for previous versions:
public Form1()
{
    InitializeComponent();
    List<Item> items = new List<Item> { new Item(1, "Soooome veeeeeery looong text") };
    this.radDropDownList1.DataSource = items;
    this.radDropDownList1.DisplayMember = "Name";
    this.radDropDownList1.ValueMember = "Id";
 
    this.radMultiColumnComboBox1.DataSource = items;
    this.radMultiColumnComboBox1.DisplayMember = "Name";
    this.radMultiColumnComboBox1.ValueMember = "Id";
}
 
public class Item
{
    public int Id { get; set; }
 
    public string Name { get; set; }
 
    public Item(int id, string name)
    {
        this.Id = id;
        this.Name = name;
    }
}
 
protected override void OnLoad(EventArgs e)
{
    this.radDropDownList1.SelectionLength = 0;
    this.radMultiColumnComboBox1.MultiColumnComboBoxElement.SelectionStart = 0;
     
    base.OnLoad(e);
}

If it is not suitable for your specific case, please specify which version you use. Thank you in advance.

I am looking forward to your reply.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Robert
Top achievements
Rank 1
answered on 24 Jun 2014, 02:54 PM
I'm using Q2 2013.  I got your solution working for simple cases, but I'm still running into problems. 

I have a button on pageView1 that sets the selected value of a  multiColumnComboBox on pageView2.  If I click on the button and then go to pageView2, the text is cut off.  If I click on pageView2 before clicking on the button, the text is fine. 
0
Accepted
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Jun 2014, 02:26 PM
Hello Robert,

Thank you for writing back.

When the RadMulticolumnComboBox is not present in the selected page, it is possible to reproduce the problem with the specified version. However, if you call the RadMulticolumnComboBox.LoadElementTree method on my end after populating the RadMulticolumnComboBox with data, the issue is not reproducible.
public Form1()
{
    InitializeComponent();
 
    List<Item> items = new List<Item> {
        new Item(1, "Soooome veeeeeery looong text"),
        new Item(2, "Second veeeeeery looong text") };
    this.radMultiColumnComboBox1.DataSource = items;
    this.radMultiColumnComboBox1.DisplayMember = "Name";
    this.radMultiColumnComboBox1.ValueMember = "Id";
 
    this.radMultiColumnComboBox1.LoadElementTree();
}
 
public class Item
{
    public int Id { get; set; }
 
    public string Name { get; set; }
 
    public Item(int id, string name)
    {
        this.Id = id;
        this.Name = name;
    }
}

I hope this information helps. If you have any additional questions, please let me know.

Regards,
Desislava
Telerik
 
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
 
0
Robert
Top achievements
Rank 1
answered on 26 Jun 2014, 02:34 PM
That did it.  Thanks you.
0
Catalin
Top achievements
Rank 1
Veteran
answered on 23 Feb 2015, 09:15 PM
Hi,

After calling LoadElementTree(), the RadMultiColumnComboBox displays the left side of the text.

Playing with the focus on this control will actually modify this behaviour, please see the attached capture.

Actually, I can’t find a way to display the left side of the content when no focus on the combo.

Thanks for your help,
Catalin

 

PS: version
Q3 2014 (2014.3.1202.40).
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 26 Feb 2015, 10:26 AM
Hello Catalin,

Thank you for writing.

Your question has already been answered in the support thread you have opened on the same topic. However, I am posting the answer here as well in order the community to benefit from it.

This problem is already logged in our feedback portal. You can track its progress, subscribe for status changes and add your vote/comment to it on the following link - feedback item

Currently, the possible solution that I can suggest is to use the Leave event and clear the selection:
private void radMultiColumnComboBox1_Leave(object sender, EventArgs e)
{
    this.radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.TextBoxItem.SelectionLength = 0;
}

I hope this information helps. Should you have further questions, I would be glad to help.
 
Regards,
Dess
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
MultiColumn ComboBox
Asked by
Robert
Top achievements
Rank 1
Answers by
Dess | Tech Support Engineer, Principal
Telerik team
Robert
Top achievements
Rank 1
Catalin
Top achievements
Rank 1
Veteran
Share this question
or