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.
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.
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
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.