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

Display of the selected element

3 Answers 194 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
OD
Top achievements
Rank 1
OD asked on 29 Aug 2011, 01:36 PM
hi, i have a multicolumncombox object on my form, i only display the first column.
The cell width is larger than the multicolumncombox, so when i select an item, it's right aligned in the multicolumncombobox object like the screenshot.

Optionnaly i don't want the control to be highlighted when i change selected item.


thanks

3 Answers, 1 is accepted

Sort by
0
OD
Top achievements
Rank 1
answered on 31 Aug 2011, 01:18 PM
up!
0
Accepted
Stefan
Telerik team
answered on 01 Sep 2011, 09:35 AM
Hi Nermond,

Thank you for writing.

This issue was already reported by another user of ours. Please follow this link, where you can add your vote for this issue, and also subscribe for its status updates.

Meanwhile, you can work around this issue, by using the following code snippet. The code in the form Shown event is to fix the text alignment when the form is loaded, and the code in the SelectedIndexChanged fixes the text after selection change:
void radMultiColumnComboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
    string oldText = radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text;
    radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text = string.Empty;
    radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text = oldText;
}
 
protected override void OnShown(EventArgs e)
{
    base.OnShown(e);
    string oldText = radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text;
    radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text = string.Empty;
    radMultiColumnComboBox1.MultiColumnComboBoxElement.TextBoxElement.Text = oldText;
}

I hope that you find this information helpful. Should you have any other questions, do not hesitate to contact us.
 
Kind regards,
Stefan
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
OD
Top achievements
Rank 1
answered on 02 Sep 2011, 01:29 PM
super, that works very well :-)
Tags
MultiColumn ComboBox
Asked by
OD
Top achievements
Rank 1
Answers by
OD
Top achievements
Rank 1
Stefan
Telerik team
Share this question
or