Wrong type of args in procedure generated on change event SelectBar

Wrong type of args in procedure generated on change event SelectBar:
3 2

If manually fixed to: IEnumerable, then it works.
protected async System.Threading.Tasks.Task Selectbar0Change(IEnumerable args)
{ .... }

Am I doing the right?

Thanks for reporting this! It will be fixed in the next update.

1 Like

I've just tried to reproduce this however everything worked normally on my end:

What is you Radzen version? Do you have TValue set as attribute?

3333 222 11

As in the component demo I tried to repeat.
I also tried with the dinamic, but there were other errors.


Hmm.. I see the problem now. We should rework the SelectBar component to work similar to other components like DropDown and ListBox where both single and multiple selection is allowed and TValue can be for example int or IEnumerable<int> depending if Multiple is set to false or true. We will fix the component and I'll let you know when the update is available.

1 Like

The temporary solution that I made in my project:
(In order not to disable the module auto-generation. And keep making changes.)

   IEnumerable<int> _currentFltI;
        protected IEnumerable<int> currentFltI
                return _currentFltI;
                if (!object.Equals(_currentFltI, value))
                    _currentFltI = value;


Radzen.Blazor and demo updated:

When Multiple is set to true you should provide IEnumerable as Value and set TValue when needed. For example:

And the generated code will be:

1 Like