Filtering Nullable Guid Column in Grid Causes Exception

2 posts, 0 answers
  1. John
    John avatar
    38 posts
    Member since:
    Apr 2015

    Posted 28 Oct 2016 Link to this post

    I have a nullable Guid column in my grid that is using an editor template to display a the text value associated with the Guid in the lookup table.

    columns.ForeignKey(p => p.NotAcceptableReason, (System.Collections.IEnumerable)ViewBag.NotAcceptableReasons, "NotAcceptableReasonId", "NotAcceptableReasonName").Width(200);


    The editor template:

    @using Kendo.Mvc.UI
    @model object
     Html.Kendo().DropDownListFor(m => m)
            .BindTo((SelectList)ViewData[ViewData.TemplateInfo.GetFullHtmlFieldName("") + "_Data"])
            .OptionLabel("--- Select ---")


    On that column's column filter popup,I get all the text values from the lookup table in a drop down list and the filtering work as expected.

    However, when I try to filter the column on "Is null" or "Is not null" I get an error -> System.FormatException: Unrecognized Guid format.

    I suspect this is because there is no NULL entry in the lookup table I'm binding the drop down list to.  Any suggestions for getting the "Is null" or "Is not null" column filters to work correctly in this scenario?


  2. Danail Vasilev
    Danail Vasilev avatar
    1502 posts

    Posted 01 Nov 2016 Link to this post

    Hi John,

    I wasn't able to reproduce the mentioned issue with this online demo - Could you please try to reproduce the problem with this demo and then send it back to us for further investigation?

    You can try to download the offline demos in order to use the data source or bind some dummy to the grid. Another approach to reproduce the issue is to download some of our mvc examples (e.g., this one -  grid-foreign-key-combo-box-column)

    Danail Vasilev
    Telerik by Progress
    Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Back to Top