I have a grid that has a column bound to it:
columns.Bound(p => p.FailureStrategyLookup).ClientTemplate("#=FailureStrategyLookup.FailureStrategy#").Width(100);
If the FailureStrategyLookup is NOT null, everything works fine. But when it IS NULL it can't bind the the object and I get an error saying "FailureStrategy" can't be found for a null value (or something to that affect). How can I get thsi working for a COMPLEX type when it's null?
public class FailureStrategyLookupViewModel{ [Required] public int FailureStrategyID { get; set; } [Required] [DisplayName("Maintenance Strategy")] public string FailureStrategy { get; set; }}ssdsdf
@using eRPortalDashboard.Models;@using Kendo.Mvc.UI;@model FailureStrategyLookupViewModel@(Html.Kendo().DropDownListFor(m => m) .DataValueField("FailureStrategyID") .DataTextField("FailureStrategy") .BindTo((System.Collections.IEnumerable)TempData["FailureStrategyLookups"]))