Thanks for responding.
Since my initial email I've tried to use the standard MVC DropDownList (Multiple) and I'm getting similar problems so the issue isn't Telerik specific.
Here's the code for the standard MVC dropdown I'm using
@Html.DropDownList("caseConditions", (MultiSelectList)ViewBag.Categories, new { multiple = "multiple" })
If CaseConditions is a String it just saves only 1 item.
If CaseConditions is a String[] I get an error. The same shown as before.
Before sending more code, has anybody had any success using any standard MVC Multi select with ASP Net Zero?
If so, how did you manage to Post the selected items without errors or only having 1 item saved?
A vote from me too. It's been a real pain to try to get it to integrate.
Hi Aaron
Thanks for responding. To be honest I'm a bit confused, I've been using the MVC version of these controls for years without issue.
I don't understand why when the values are filled in, the client side validation is satisfied and yet the server side thinks the values are null.
If I use the following code then the Client Validation works but not Server Side
@(Html.Kendo().DropDownListFor(m => m.DpmsActivity.Status)
If I use the following code then the Server Validation works but not Client Side
@(Html.Kendo().DropDownList() .Name("status") .Value(Model.DpmsActivity.Status)
The server side seems to be looking for "status" but the client side is looking for "DpmsActivity.Status".
When the Rad Tool created the form in the first place, it named the control "status" which seems strange as the ViewModel suggests it should be "DpmsActivity.Status". When I changed the controls to Telerik versions I bound them to the ViewModel as would normally be expected. I'm really not sure how to fix this.
Could it be serializeFormToObject(); that's confusing matters?
That's great, thanks so much for pointing me in the right direction. I'm under a lot of time pressure so all help is appreciated.
By the way, I'm looking forward to Blazor becoming mainstream to minimize my need to use Javascript!
No, I'm more than happy to use some new or existing code. I just don't want to duplicate any existing methods that might be available that I'm not aware of.
As I mainly code in C#/MVC I often find JS less than easy to navigate so I was hoping for a bit of guidance from someone a with a bit more experience of JS/Boilerplate/Zero to show the best approach.
Great to hear Blazor is on your radar.
I love using C#, MVC etc but Javascript has always been a pain. When I first saw the Blazor demos I thought.... bingo!
Keep up the great work and thanks for sharing with us that you've at least had a look at it.
That fixed it!
All of the ABP Nugets were 3.6.1 except for the ones in the .Core project which were 3.5.0. They're now been updated.
Many thanks!
Thanks for clarifying that it's not built in functionality. It might be a nice thing to have sometime in the future.
There's a lot of discussion about it here. I've used something similar on previous projects and it really makes life easier and reduces human error.
[https://stackoverflow.com/questions/5940506/how-can-i-modify-labelfor-to-display-an-asterisk-on-required-fields])
Many thanks for your guidance!
Apologies Aaron, I thought your workaround was only for the Default issue. I only discovered the dropdown issue this afternoon!
Many thanks for your help.