init
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
using System.Text;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace Kreta.Web.Helpers
|
||||
{
|
||||
public static class GridTemplateExtensions
|
||||
{
|
||||
|
||||
public static MvcHtmlString KretaGridTemplate(this HtmlHelper helper, string templateId)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb
|
||||
.Append($"<script id=\"{templateId}\" type=\"text/x-kendo-template\">")
|
||||
.Append("</script>");
|
||||
|
||||
MvcHtmlString str = new MvcHtmlString(sb.ToString());
|
||||
return str;
|
||||
}
|
||||
|
||||
public static MvcHtmlString KretaTooltipTemplate(this HtmlHelper helper, string templateId, string content)
|
||||
{
|
||||
StringBuilder sb = new StringBuilder();
|
||||
|
||||
sb
|
||||
.Append($"<script id=\"{templateId}\" type=\"text/x-kendo-template\">")
|
||||
.Append(content)
|
||||
.Append("</script>");
|
||||
|
||||
MvcHtmlString str = new MvcHtmlString(sb.ToString());
|
||||
return str;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user