My previous post went unanswered and had to figure it out myself (so much for premium support), but eventually got it figured out. Now I am stuck again - with the same stupid widget.
$999 for half working widgets, basic documentation and no support is starting to seriously get to me.
Anyway, I am populating my Multiselect widget with a list of Weighbridges. This part works fine. I can also select weighbridges with no problem.
When I post back to the controller, the model reflects the number of items I selected in the Multiselect, but the data is either null (for strings) or 0 (for ints).
Controller populating the ViewBag
My Lookup class
Widget implementation
My UserModel class with the portion of interest.
Upon posting back to the controller, the rest of the model details are 100%. My Weighbridges property shows the number of items that were selected in the Multiselect, but none of the values are set.
I am using the Multiselect in a popup editor for grid editing.
Can someone help? And today please. I have wasted 2 full working days trying to get the Multiselect to work. KendoUI is supposed to boost productivity surely?
$999 for half working widgets, basic documentation and no support is starting to seriously get to me.
Anyway, I am populating my Multiselect widget with a list of Weighbridges. This part works fine. I can also select weighbridges with no problem.
When I post back to the controller, the model reflects the number of items I selected in the Multiselect, but the data is either null (for strings) or 0 (for ints).
Controller populating the ViewBag
ViewBag.Weighbridges = dbDataService.ToLookUp<
Weighbridge
>();
public class LookupEntity : ILookupEntity
{
public int Id { get; set; }
public string Description { get; set; }
}
@(Html.Kendo().MultiSelectFor(model => model.Weighbridges)
.Name("Weighbridges")
.DataTextField("Description")
.DataValueField("Id")
.Value(Model.Weighbridges)
.Placeholder("Select weighbridges...")
.HtmlAttributes(new {style= "width:310px"})
.AutoBind(true)
.BindTo((IEnumerable<
LookupEntity
>)ViewBag.Weighbridges)
)
[DisplayName("Assigned Weighbridges")]
public IEnumerable<
LookupEntity
> Weighbridges { get; set; }
Upon posting back to the controller, the rest of the model details are 100%. My Weighbridges property shows the number of items that were selected in the Multiselect, but none of the values are set.
I am using the Multiselect in a popup editor for grid editing.
Can someone help? And today please. I have wasted 2 full working days trying to get the Multiselect to work. KendoUI is supposed to boost productivity surely?