2012 Version Multi Combo box filter

7 posts, 1 answers
  1. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 19 Jun 2012 Link to this post

    Hi,

      We are using Telerik 2012 version winforms Controls.

     we are facing following problem with Multi - Combo box Control.

    1. After setting Selected Value through Programmatically, if we opening drop down , then selected Item is not displaying as  first item.

    Thanks & Regards,
    Surya.
  2. Answer
    Svett
    Admin
    Svett avatar
    728 posts

    Posted 22 Jun 2012 Link to this post

    Hello Surya,

    I did not manage reproduce the issue. I have used the following code snippet to achieve your scenario:

    DataTable table = new DataTable("table");
    table.Columns.Add("ID", typeof(int));
    table.Columns.Add("Name", typeof(string));
     
    table.Rows.Add(1, "Telerik");
    table.Rows.Add(2, "Google");
    table.Rows.Add(3, "Microsoft");
    table.Rows.Add(4, "Apple");
    table.Rows.Add(5, "Amazon");
    table.Rows.Add(6, "Sitefinity");
    table.Rows.Add(7, "Infosys");
    table.Rows.Add(8, "Coca-Cola");
    table.Rows.Add(9, "Pepsi");
    table.Rows.Add(10, "KFC");
    table.Rows.Add(11, "MacDonalds");
    table.Rows.Add(12, "Apache");
    table.Rows.Add(13, "Cisco");
    table.Rows.Add(14, "Skype");
    table.Rows.Add(15, "KTM");
    table.Rows.Add(16, "BMW");
     
    this.radMultiColumnComboBox1.ValueMember = "ID";
    this.radMultiColumnComboBox1.DisplayMember = "Name";
    this.radMultiColumnComboBox1.DataSource = table;
    this.radMultiColumnComboBox1.SelectedValue = 16;

    Notice that I am using Q2 2012 (2012.2 608).

    Could you share a sample code that demonstrates your scenario in detail? Regards,
    Svett
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Surya
    Surya avatar
    35 posts
    Member since:
    Nov 2011

    Posted 22 Jun 2012 Link to this post

    Hi,

     Thanks for quick response. I found error in my coding and issue is fixed.


    Thanks & Regards,
    Surya.
  5. maharajan
    maharajan avatar
    3 posts
    Member since:
    Jun 2011

    Posted 01 Aug 2012 Link to this post

    Hi, i have a Rad GridView in WinForms, in that gridview im populating a cell with MultiColumnComboboxelement with multi select option,
    My requirement is that i need to set the selected items like "example1,exaple2.." to that combobox or the cell it belongs
    how can i achieve it through programmatically ? Im using Telerik Winforms 2012 Q1 version with VB.net code.
    Please find the attached images for your reference.

    any help would be appreciated.
    Thanks and regards
    Maharajan.
  6. Svett
    Admin
    Svett avatar
    728 posts

    Posted 06 Aug 2012 Link to this post

    Hello Maharajan,

    Presently, the RadMultiColumnComboBox does not support such a functionality out of the box. Nevertheless, you can use the code library that show how you can do this scenario by using RadDropDownListElement. You can find the article here.

    Kind regards,
    Svett
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
  7. maharajan
    maharajan avatar
    3 posts
    Member since:
    Jun 2011

    Posted 06 Aug 2012 Link to this post

    Thank you for posting this.
    this works fine with separate DD.

    My requirement is i need to implement this MultiSelect Drop down in RadGridView as one of the column.
    How can i use this control to a GRID view column?

    Thank you if i get such one sample.
    Regards
    Maharajan.P
  8. Svett
    Admin
    Svett avatar
    728 posts

    Posted 08 Aug 2012 Link to this post

    Hello Maharajan,

    You can reuse the custom drop down list element as editor in the RadGridView. You should do that by creating a custom RadDropDownListEditor. You can use the following template as sample:
    public class MyRadDropDownListEditor : RadDropDownListEditor
    {
        protected override Telerik.WinControls.RadElement CreateEditorElement()
        {
            return new MyRadDropDownListEditorElement();
        }
    }
     
    public class MyRadDropDownListEditorElement : RadDropDownListEditorElement
    {
        // THE LOGIC FROM THE CODE LIBRARY
        public MyRadDropDownListEditorElement()
        {
            this.ListElement.CreatingVisualItem += new CreatingVisualListItemEventHandler(ListElement_CreatingVisualItem);
        }
     
        void ListElement_CreatingVisualItem(object sender, CreatingVisualListItemEventArgs args)
        {
     
        }
     
     
    }

    You should use the EditorRequired event to replace the default editor:
    void radGridView1_EditorRequired(object sender, EditorRequiredEventArgs e)
    {
        if (e.EditorType == typeof(RadDropDownListEditor))
        {
            e.EditorType = typeof(MyRadDropDownListEditor);
        }
    }

    Note that you should use GridViewComboBoxColumn to have drop down list editor in RadGridView.

    All the best,
    Svett
    the Telerik team
    RadControls for WinForms Q2'12 release is now live! Check out what's new or download a free trial >>
Back to Top
UI for WinForms is Visual Studio 2017 Ready