asp.net-mvctelerikclient-templates

Telerik Kendo MVC UI - ClientFooterTemplate ViewBag value


I am trying to get the value of ViewBag into ClientFooterTemplate as follows:

ClientFooterTemplate("<div style='#= (average > 'ViewBag.FBGLG') ? 'color: \\#FF0000;' : '' #'>#:average#</div>");

Does not work?

To check the Template I used:

ClientFooterTemplate("<div style='#= (average > 7) ? 'color: \\#FF0000;' : '' #'>#:average#</div>");

Works great.

I tried:

#=ViewBag.FBGLG'# , '@ViewBag.FBGLG', and ViewBag.FBGLG. 

None worked!!

Would appreciate your suggestions.


Solution

  • I got the answer from Telerik Support, here it is just in case someone else has the same issue: It should be

    (average > "+ ViewBag.FBGLG +")