Grid view with Multi column combo box

2 posts, 0 answers
  1. T S
    T S avatar
    5 posts
    Member since:
    Jul 2015

    Posted 16 Sep 2015 Link to this post


     Am using Rad grid view with Multi column combo box.

     I created a Column type as GridViewMultiComboBoxColumn, attached the data source, also included the displaymember, valuemember,dropdwonstyle as RadDropDownStyle.DropDown. and added the column to the grid.

    I am facing a problem that if i type in the  GridView MultiComboBox Column, the control is not filtering and showing result.

    I got a documentation  saying

    The drop-down element is an object of type MultiColumnComboBoxElement. Use this element to set the drop-down style, animation and sizing as you would do for the regular combobox.  
    The EditorControl property of the MultiColumnComboBoxElement gives you a reference to the RadGridView control. Using that reference you can obtain the RadGridView object and work as with normal RadGridView control. Refer to RadGridView documentation for additional information on RadGridView.

    The current version has one limitation that you should consider:
    You cannot use the auto-complete mode of RadDropDownList
    The RadGridView control hosted in the drop-down does not allow editing operations
    The RadGridView control hosted in the drop-down does not support filtering, grouping and sorting operations.

    kindly confirm me is it a limitation or do i need to include something else in my code.

    I am including the code snip shot for your ref. 

    bool isColumnAdded=false; 

    private void Form1_Load(object sender, EventArgs e)



    private void filldata()
                SqlCommand cmmdata = new SqlCommand();
                cmmdata.Connection = constkbal;
                cmmdata.CommandText = "select top 50 stockno from itemmaster";
                SqlDataReader srdtls = cmmdata.ExecuteReader();
                DataTable dtdetails = new DataTable();
                GridViewMultiComboBoxColumn col = new GridViewMultiComboBoxColumn();
                col.DataSource = dtdetails;
                col.DisplayMember = "stockno";
                col.ValueMember = "stockno";
                col.FieldName = "stockno";
                col.HeaderText = "stockno";
                col.Width = 400;
                col.DropDownStyle = RadDropDownStyle.DropDown;
                col.FilteringMode = GridViewFilteringMode.DisplayMember;

    private void griditemdisplay_CellBeginEdit(object sender, GridViewCellCancelEventArgs e)
                if (this.griditemdisplay.CurrentColumn is GridViewMultiComboBoxColumn)
                    if (!isColumnAdded)
                        isColumnAdded = true;
                        RadMultiColumnComboBoxElement serchengineElement = (RadMultiColumnComboBoxElement)this.griditemdisplay.ActiveEditor;
                        serchengineElement.DropDownSizingMode = SizingMode.UpDownAndRightBottom;
                        serchengineElement.DropDownMinSize = new Size(550, 300);
                        serchengineElement.DropDownMaxSize = new Size(550, 300);
                        serchengineElement.EditorControl.MasterTemplate.AutoGenerateColumns = false;
                        serchengineElement.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend;
                        serchengineElement.AutoSizeDropDownToBestFit = false;
                        serchengineElement.DropDownAnimationEnabled = false;
                        serchengineElement.EditorControl.Columns.Add(new GridViewTextBoxColumn("Stockno"));
                        FilterDescriptor filtercustomername = new FilterDescriptor("Stockno", FilterOperator.Contains, string.Empty);








  2. Dess
    Dess avatar
    1561 posts

    Posted 18 Sep 2015 Link to this post


    Thank you for writing.
    In order to filter the rows in the popup grid while typing RadMultiColumnComboBoxElement, you should set the AutoFilter property to true and add the appropriate FilterDescriptor. Please refer to the MultiColumnComboBox >> Filtering help article which is quite useful on this topic. I have prepared a sample project for your convenience.

    Indeed, the popup grid does not allow editing, grouping, filtering etc. It is supposed to offer just a selection list for the user. If you need to support the mentioned features, you can implement a custom editor and host a RadPopupEditorControl with the desired grid behavior.

    I hope this information helps. Should you have further questions I would be glad to help.
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft R3 2016 release webinar banner
Back to Top