I was using some ForeignKeys columns as DropDownLists in a Kendo MVC grid, and got it to work pretty easily (after reading G’s comment about creating the EditorTemplate, that is).
While editing, however, one of my values was not being posted by Edit or Create mehtods. After confirming that my code was correct and some head-scratching, a little research on Stack Overflow revealed the problem: the grid won’t bind fields whose underlying type is Nullable.
Here is the Stack Overflow post (Note: not the accepted answer) that revealed the problem, as well as a link that describes the solution in detail (see snippets 9 and 10).
Thanks to Wagar for pointing out the solution to this rather esoteric behavior.
Filed under: ASP.Net Tagged: Data Binding, Foreign Key Column, grid, kendo UI, nullable
