MultiColumn in Display

2 posts, 0 answers
  1. Boris
    Boris avatar
    1 posts
    Member since:
    Apr 2014

    Posted 05 Apr 2014 Link to this post


    How to do i Display multiple fields in Display/Select Box?

    Basically  is there way do display selected row, instead of just one filed Selected Filed

    Thank you.
  2. Dess
    Dess avatar
    1772 posts

    Posted 09 Apr 2014 Link to this post

    Hello Boris,

    Thank you for writing.

    If I understand your requirement correctly, you are trying to display the multiple cell values from the currently selected row in the popup grid inside the editable part of the RadMultiColumnComboBox. This functionality is not supported our of the box.

    The multi-column combobox is a special case of combobox control with RadGridView integrated in its drop-down. The control combines the functionality and features of RadComboBox and RadGridView. According to the DisplayMember property, you are allowed to display only one cell value according to the current selection. You can customize the default behavior and display several values in the text area via custom MultiColumnComboGridBehavior.  Here is a sample code snippet, demonstrating how to achieve it:
    private void Form1_Load(object sender, EventArgs e)
        this.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.CurrentRowChanged += EditorControl_CurrentRowChanged;
        this.radMultiColumnComboBox1.MultiColumnComboBoxElement.EditorControl.GridBehavior = new CustomMultiColumnComboGridBehavior();
        this.radMultiColumnComboBox1.DataSource = this.productsBindingSource; 
    private void EditorControl_CurrentRowChanged(object sender, Telerik.WinControls.UI.CurrentRowChangedEventArgs e)
        StringBuilder sb = new StringBuilder();
        foreach (GridViewCellInfo cell in e.CurrentRow.Cells)
            sb.AppendFormat("{0} | ", cell.Value);
        radMultiColumnComboBox1.MultiColumnComboBoxElement.Tag = sb.ToString();
        radMultiColumnComboBox1.MultiColumnComboBoxElement.Text = sb.ToString();
    public class CustomMultiColumnComboGridBehavior : MultiColumnComboGridBehavior
        public override bool OnMouseUp(MouseEventArgs e)
            bool result = base.OnMouseUp(e);
            MultiColumnComboPopupForm popupForm = this.GridViewElement.ElementTree.Control.Parent as MultiColumnComboPopupForm;
            RadMultiColumnComboBoxElement multiComboBoxElement = popupForm.OwnerElement as RadMultiColumnComboBoxElement;
            if (multiComboBoxElement.Tag != null && multiComboBoxElement.Text != multiComboBoxElement.Tag)
                multiComboBoxElement.Text = multiComboBoxElement.Tag.ToString();
                multiComboBoxElement.Tag = null;
            return result;

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


    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.

Back to Top