Compile error in devexpress simple display templates

Nov 27, 2013 at 8:47 PM
Edited Nov 27, 2013 at 9: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("");
}).Bind(Model).GetHtml()

Fails to compile with "The type '...ws.Shared.DisplayTemplates.Boolean' 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?
Coordinator
Nov 27, 2013 at 8: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 9:04 PM
No worries, I think it only needs 1 view with a devexpress grid to reproduce.
Coordinator
Dec 3, 2013 at 1: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: https://razorgenerator.codeplex.com/workitem/133
Dec 27, 2013 at 1:56 PM
Hi, i think my posted issue (https://razorgenerator.codeplex.com/workitem/134) is also related to this. The only difference is that we use Telerik Kendo UI mvc controls.
Coordinator
Dec 27, 2013 at 5:43 PM
@damden: same question as above: Are you using the Vsix or RazorGenerator.MsBuild package?
Jan 6, 2014 at 12: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 11:59 AM
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.