Possible to filter RadzenDropDown on more than one property of object?

I am trying to use the RadzenDropDown component with a collection of objects, it doesn't appear possible to filter based on more than one property of the object. Is this the case? If not, how can I accomplish this?

ex:
Company object contains two properties; company.name and company.id, the RadzenDropDown component only seems to filter on TextValue and you can only put a single property of the company object in that field.

thanks.

You may use RadzenDropDownDataGrid and setting

 AllowFilteringByAllStringColumns="true"

to search by multiple column

Hello Vinod_Pillai,

I am looking for a single column drop down, not a grid component. I am binding the drop down list to a collection of objects. I am using an ItemTemplate to compose the text in the drop down list from multiple properties in that object (in this case company name and company number). I would like the user to be able to filter based on multiple properties, but the current implementation apparently only supports a single property name, neither multiple properties, nor lambda expressions work. So to reiterate, I need a single column (created from multiple properties via an ItemTemplate) and I need to let the user filter against the entire text in that displayed column.

At the moment, I have created a synthetic property containing the contents of the multiple properties I need to filter against and set the singular allowed property to that property.

thanks,

rik.

Hello rik,
Since you need multicolumn search using dropdown you need to derive a new dataobject (queryable,List) from your original collection or from custom methods such that multiple columns are combined as a single column and then bind the dropdown to this new dataobject.

GetNewDataObject=(from p in PrevDataObject select p.CompanyName+p.CompanyNo).ToList();

Bind your dropdown to data property to list obtained above

Hello Vinod,

So basically no then. I'll keep using my workaround.

It would be really helpful if responses wouldn't always assume that people are using the entity framework in their answers. Personally I am using Dapper, and I almost never use the entity framework.

thanks,

rik.

Hello rik,
You have posted under
Radzen IDE (Blazor server-side)

1 Like

Hi Vinod,

Sorry about that, I'm not sure how that happened as I try to only post under Radzen.Blazor components.
rik.

@rik

Acting like this towards people who try to help you is not tolerated in this forum. Consider this your final warning.