Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > MultiColumn ComboBox > Display of the selected element

Answered Display of the selected element

Feed from this thread
  • Nermond avatar

    Posted on Aug 29, 2011 (permalink)

    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
    Attached files

    Reply

  • Nermond avatar

    Posted on Aug 31, 2011 (permalink)

    up!

    Reply

  • Answer Stefan Stefan admin's avatar

    Posted on Sep 1, 2011 (permalink)

    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 >>

    Reply

  • Nermond avatar

    Posted on Sep 2, 2011 (permalink)

    super, that works very well :-)

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / WinForms > MultiColumn ComboBox > Display of the selected element
Related resources for "Display of the selected element"

[ Features | Demos | Documentation | Knowledge Base | Telerik TV | Code Library | Step-by-step Tutorial | Blogs | Self-Paced Trainer ]