This project is read-only.

Compile error in devexpress simple display templates

Nov 27, 2013 at 9:47 PM
Edited Nov 27, 2013 at 10:02 PM
I am trying to use RazorGenerator 2.2.1 with MVC4 project using devexpress mvc extensions but it failed to compile on the 3 shared view display templates for Boolean, DateTime and Decimal types. I saw another related post and qualified the types by adding System. which did fixed the errors on Decimal and Datetime but not Boolean.

current editor template
@model System.Boolean?
@Html.DevExpress().CheckBoxFor(m => m).GetHtml() ViewContext.ViewData.TemplateInfo.GetFullHtmlFieldName("");

Fails to compile with "The type '' must be a non-nullable value type in order to use it as parameter 'T' in the generic type or method System.Nullable<T>'

Any suggestions? I must be doing something wrong or is razor generator not compatible with devexpress extensions 13.1?
Nov 27, 2013 at 9:53 PM
@mai0, I think there's a bug in the RazorGenerator when it comes to Editor templates \ display templates. Do you think you could share a sample repro app and I'll try and have it fixed over this week.
Nov 27, 2013 at 10:04 PM
No worries, I think it only needs 1 view with a devexpress grid to reproduce.
Dec 3, 2013 at 2:13 AM
Are you using the Vsix or RazorGenerator.MsBuild package? I've released a fix for the package as part of v2.2.2, we could update the vsix too if you're using it. Also, tracking work item:
Dec 27, 2013 at 2:56 PM
Hi, i think my posted issue ( is also related to this. The only difference is that we use Telerik Kendo UI mvc controls.
Dec 27, 2013 at 6:43 PM
@damden: same question as above: Are you using the Vsix or RazorGenerator.MsBuild package?
Jan 6, 2014 at 1:08 PM
@davidebbo: I did install version 1.6.2 of the Razor Generator Extension from within Visual Studio 2013 (so the Vsix).
Jan 15, 2014 at 12:59 PM
Hi, i did start using the MsBuild way of Razor Generator instead of the Extension, and got my problem to work. I'm not getting any errors anymore using Telerik Kendo UI mvc controls.