radzenhq / radzen-blazor

Radzen Blazor is a set of 90+ free native Blazor UI components packed with DataGrid, Scheduler, Charts and robust theming including Material design and FluentUI.
https://www.radzen.com
MIT License
3.61k stars 807 forks source link

Feature Request - RadzenAutoComplete with custom object/complexe types #898

Closed msdevcode closed 1 year ago

msdevcode commented 1 year ago

Is your feature request related to a problem? Please describe. Searching for customers, objects etc on-demand with LoadData-method and without RadzenDropDown-component

Current RadzenAutoComplete-component doenst support custom objects/complexe types.

Describe the solution you'd like Extend the current RadzenAutoComplete-component to allow binding/searching custom objects

Describe alternatives you've considered Maybe there is a possibility to add a new radzen-component like this blazor-component: Github Blazored/Typeahead

grafik

I currently using this one, but the creator unfortunately stopped the main-development.

Would be nice to get a radzen-component like this with radzen-themes and your support.

Additional context I tried to extend the current autocomplete-component at my own fork. I saw RadzenDropDown got custom object support, so i tried to transfer the feature to RadzenAutoComplete, but i failed.

Maybe it fits into your radzen-roadmap

enchev commented 1 year ago

Hi @msdevcode,

Not sure I understand the described limitation. All of our examples are using custom objects: https://blazor.radzen.com/autocomplete

msdevcode commented 1 year ago

Hey @enchev

Oh well, i probably just missed that or failed to use it properly. Nevermind, i will try it again. Thanks for your reply.

SchubertDNS commented 1 year ago

Hi,

may I ask again on this topic? I have the same problem and I dont see how this is actually covered, The Autocomplete expects a value binding to string, the examples are "limited" to this also.

If I compare the code between Autocomplete and Dropdown, I find this difference: public partial class RadzenAutoComplete : DataBoundFormComponent<string> public partial class RadzenDropDown<TValue> : DropDownBase<TValue>

@msdevcode: Did you already achieve the complex object binding without the need to use a string property as separate value binding?

I don't find anything on Autocomplete which is equal to this: https://blazor.radzen.com/dropdown-custom-objects

Sorry if my understanding is wrong.

msdevcode commented 1 year ago

Hey @SchubertDNS,

i also found out that difference between these classes. I tried to change the DataBoundFormComponent<string> to ...<TValue> at my fork to publish a PR but it failed to get everything working again at RadzenAutoComplete.

Unfortunately i got no solution and still use the other NuGet i mentioned in my first post.

My english isnt that perfect, maybe i explained my problem with the wrong details or kinda like that.

I would love to use the RadzenAutoComplete with a complex object binding instead with a "simple" string object.