Exemple #1
0
 private void SerializeContent(Dictionary <string, object> options)
 {
     if (ContentUrl.HasValue())
     {
         options["content"] = new Dictionary <string, object>()
         {
             { "url", ContentUrl }
         };
     }
     else if (ContentHandler.HasValue())
     {
         options["content"] = ContentHandler;
     }
     else if (!String.IsNullOrEmpty(ContentTemplateId))
     {
         var idPrefix = "#";
         if (IsInClientTemplate)
         {
             idPrefix = "\\" + idPrefix;
         }
         options["content"] = new ClientHandlerDescriptor {
             HandlerName = String.Format("kendo.template($('{0}{1}').html())", idPrefix, ContentTemplateId)
         };
     }
     else if (Content.HasValue())
     {
         options["content"] = HttpUtility.UrlDecode(Content);
     }
 }