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

2012 Version Multi Combo box filter

6 Answers 244 Views
MultiColumn ComboBox
This is a migrated thread and some comments may be shown as answers.
Surya
Top achievements
Rank 1
Surya asked on 19 Jun 2012, 03:08 PM
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.

6 Answers, 1 is accepted

Sort by
0
Accepted
Svett
Telerik team
answered on 22 Jun 2012, 11:43 AM
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 >>
0
Surya
Top achievements
Rank 1
answered on 22 Jun 2012, 05:30 PM
Hi,

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


Thanks & Regards,
Surya.
0
maharajan
Top achievements
Rank 1
answered on 01 Aug 2012, 11:54 AM
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.
0
Svett
Telerik team
answered on 06 Aug 2012, 08:59 AM
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 >>
0
maharajan
Top achievements
Rank 1
answered on 06 Aug 2012, 12:38 PM
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
0
Svett
Telerik team
answered on 08 Aug 2012, 03:02 PM
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 >>
Tags
MultiColumn ComboBox
Asked by
Surya
Top achievements
Rank 1
Answers by
Svett
Telerik team
Surya
Top achievements
Rank 1
maharajan
Top achievements
Rank 1
Share this question
or