Telerik Kendo MVC UI - ClientFooterTemplate ViewBag value

704 Views Asked by At

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.

2

There are 2 best solutions below

0
On BEST ANSWER

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 +")
1
On

Could you please try this one "ViewBag.FBGLG" ?