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

New MultiColumnComboBox?

3 Answers 71 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Keivan Kechmiri
Top achievements
Rank 1
Keivan Kechmiri asked on 13 Sep 2018, 09:16 AM

Hi

Where is/when can we get the same new feature MultiColumnComboBox as for example .Net Core?

 

3 Answers, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 13 Sep 2018, 09:41 AM
Hi Keivan,

You can do this by defining the templates of the RadComboBox and writing the data source query to target the desired fields of the data source in the ItemsRequested handler. You can find such an example in the following demo: https://demos.telerik.com/aspnet-ajax/combobox/examples/functionality/multicolumncombo/defaultcs.aspx.


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
0
Keivan Kechmiri
Top achievements
Rank 1
answered on 13 Sep 2018, 09:47 AM

This won't work, what I need is the ability to search & filter on different colums.

A simple example:

I have a table with media (audio & video) and I have a field with the media type (1-audio 2-video). I need to be able to select/filter that I only whant for exampel videos (because a musicvideo can have the same title as a audio track) when a search for a title.

0
Marin Bratanov
Telerik team
answered on 13 Sep 2018, 10:29 AM
Hello Keivan,

You can do this by crafting your database query in the appropriate way. Here is how this is done in the demo:

  • we are examining the first combobox that has filtering enabled
  • it fires the ItemsRequested event
  • in that event, we set the appropriate query:
    protected void RadComboBox1_ItemsRequested(object sender, RadComboBoxItemsRequestedEventArgs e)
    {       
        //get all customers whose name starts with e.Text
        string sql = "SELECT * from Customers WHERE ContactName LIKE '" + e.Text + "%'";
     
        SessionDataSource1.SelectCommand = sql;           
        RadComboBox1.DataBind();
    }

 


Regards,
Marin Bratanov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
General Discussions
Asked by
Keivan Kechmiri
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Keivan Kechmiri
Top achievements
Rank 1
Share this question
or