Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?2019 Community Moderator ElectionSettings the max value on Kendo UI Slider dynamicallyKendo web grid mvc hierarchy datasource detailtemplate when local dataKendo UI ListView -TypeError: a is undefinedKendo Upload is not uploading template in CSHTMLKendo Ui web ListviewKendo UI ListView Template in MVC4formatting date in a kendo listview Template errorImplementation of Kendo Listview control in MVCHow to set columns dynamically in Kendo templateKendo Grid :TypeError: $(…).saveAsExcel is not a function

Is it insecure to send a password in a `curl` command?

Am I eligible for the Eurail Youth pass? I am 27.5 years old

How do hiring committees for research positions view getting "scooped"?

Fewest number of steps to reach 200 using special calculator

I got the following comment from a reputed math journal. What does it mean?

Does multi-classing into Fighter give you heavy armor proficiency?

Is honey really a supersaturated solution? Does heating to un-crystalize redissolve it or melt it?

Can a wizard cast a spell during their first turn of combat if they initiated combat by releasing a readied spell?

Is there a hypothetical scenario that would make Earth uninhabitable for humans, but not for (the majority of) other animals?

How are passwords stolen from companies if they only store hashes?

What does "Four-F." mean?

Do native speakers use "ultima" and "proxima" frequently in spoken English?

How is the partial sum of a geometric sequence calculated?

Probably overheated black color SMD pads

What are idioms that are antonymous to "don't skimp on"?

Suggestions on how to spend Shaabath (constructively) alone

When to use snap-off blade knife and when to use trapezoid blade knife?

Bash - pair each line of file

How does one measure the Fourier components of a signal?

Do I need to be arrogant to get ahead?

Comment Box for Substitution Method of Integrals

Is there a term for accumulated dirt on the outside of your hands and feet?

What is the term when voters “dishonestly” choose something that they do not want to choose?

What does "^L" mean in C?



Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?



2019 Community Moderator ElectionSettings the max value on Kendo UI Slider dynamicallyKendo web grid mvc hierarchy datasource detailtemplate when local dataKendo UI ListView -TypeError: a is undefinedKendo Upload is not uploading template in CSHTMLKendo Ui web ListviewKendo UI ListView Template in MVC4formatting date in a kendo listview Template errorImplementation of Kendo Listview control in MVCHow to set columns dynamically in Kendo templateKendo Grid :TypeError: $(…).saveAsExcel is not a function










0















Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?
Here I have a grid over a list. As you can see in the list the rich text is being diaplayed as HTML where as in the Grid where enocding is set to False the RIch text is being displayed as text. Can I set encoding to false on the field I want ( Comment ) in the ListView? If not what are my options as I was unable to render an editor in the Kendo template... EDIT: Goal is to remove Grid I want the list only.



 @(Html.Kendo().Grid<WorkflowItemCommentModel>()
.Name("Grid")
.Columns(columns =>

columns.Bound(e => e.Comment).Width(300).Encoded(false);

)
.DataSource(dataSource => dataSource
.Ajax()
.Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"))

)
)
<div class="col-sm-2"></div>
<div id="comments-list" class="col col-sm-10">

@(Html.Kendo().ListView<WorkflowItemCommentModel>()
.Name("CommentList")
.TagName("div")

.Events(e => e.DataBound("onCommentListDataBound").Change("onCommentCriteriaChange"))
.ClientTemplateId("itemCommentTemplate")
.DataSource(dataSource =>

dataSource.Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"));
dataSource.Sort(sort => sort.Add(f => f.CreatedDate); ).ServerOperation(false);
)
.Selectable(s => s.Mode(ListViewSelectionMode.Single))
)


Template:



 @*//WFITEM COMMENT TEMPLATE*@
<script type="text/x-kendo-tmpl" id="itemCommentTemplate">
<div class="step">
<div class="step-wrapper">
<dl class="step-list-details">
<dt class="name"><b>Name:</b>#:CreatedByUserName# <b>Date:</b> #:CreatedDate#</dt>
<dd class="stepNum">
<b>Comment:</b>
<div contenteditable="true">
#:Comment#
</div>
</dd>

<dd class="title">
<b>Internal Comment:</b> #:InternalComment#
</dd>
<dd class="stepStatus">Status: Status Test</dd>
</dl>
<div class="btn btn-primary" id="viewStep">View</div>
</div>
</div>
</script>


I want my list text to render as it does in the grid with encoding set to false:



enter image description here










share|improve this question




























    0















    Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?
    Here I have a grid over a list. As you can see in the list the rich text is being diaplayed as HTML where as in the Grid where enocding is set to False the RIch text is being displayed as text. Can I set encoding to false on the field I want ( Comment ) in the ListView? If not what are my options as I was unable to render an editor in the Kendo template... EDIT: Goal is to remove Grid I want the list only.



     @(Html.Kendo().Grid<WorkflowItemCommentModel>()
    .Name("Grid")
    .Columns(columns =>

    columns.Bound(e => e.Comment).Width(300).Encoded(false);

    )
    .DataSource(dataSource => dataSource
    .Ajax()
    .Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"))

    )
    )
    <div class="col-sm-2"></div>
    <div id="comments-list" class="col col-sm-10">

    @(Html.Kendo().ListView<WorkflowItemCommentModel>()
    .Name("CommentList")
    .TagName("div")

    .Events(e => e.DataBound("onCommentListDataBound").Change("onCommentCriteriaChange"))
    .ClientTemplateId("itemCommentTemplate")
    .DataSource(dataSource =>

    dataSource.Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"));
    dataSource.Sort(sort => sort.Add(f => f.CreatedDate); ).ServerOperation(false);
    )
    .Selectable(s => s.Mode(ListViewSelectionMode.Single))
    )


    Template:



     @*//WFITEM COMMENT TEMPLATE*@
    <script type="text/x-kendo-tmpl" id="itemCommentTemplate">
    <div class="step">
    <div class="step-wrapper">
    <dl class="step-list-details">
    <dt class="name"><b>Name:</b>#:CreatedByUserName# <b>Date:</b> #:CreatedDate#</dt>
    <dd class="stepNum">
    <b>Comment:</b>
    <div contenteditable="true">
    #:Comment#
    </div>
    </dd>

    <dd class="title">
    <b>Internal Comment:</b> #:InternalComment#
    </dd>
    <dd class="stepStatus">Status: Status Test</dd>
    </dl>
    <div class="btn btn-primary" id="viewStep">View</div>
    </div>
    </div>
    </script>


    I want my list text to render as it does in the grid with encoding set to false:



    enter image description here










    share|improve this question


























      0












      0








      0








      Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?
      Here I have a grid over a list. As you can see in the list the rich text is being diaplayed as HTML where as in the Grid where enocding is set to False the RIch text is being displayed as text. Can I set encoding to false on the field I want ( Comment ) in the ListView? If not what are my options as I was unable to render an editor in the Kendo template... EDIT: Goal is to remove Grid I want the list only.



       @(Html.Kendo().Grid<WorkflowItemCommentModel>()
      .Name("Grid")
      .Columns(columns =>

      columns.Bound(e => e.Comment).Width(300).Encoded(false);

      )
      .DataSource(dataSource => dataSource
      .Ajax()
      .Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"))

      )
      )
      <div class="col-sm-2"></div>
      <div id="comments-list" class="col col-sm-10">

      @(Html.Kendo().ListView<WorkflowItemCommentModel>()
      .Name("CommentList")
      .TagName("div")

      .Events(e => e.DataBound("onCommentListDataBound").Change("onCommentCriteriaChange"))
      .ClientTemplateId("itemCommentTemplate")
      .DataSource(dataSource =>

      dataSource.Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"));
      dataSource.Sort(sort => sort.Add(f => f.CreatedDate); ).ServerOperation(false);
      )
      .Selectable(s => s.Mode(ListViewSelectionMode.Single))
      )


      Template:



       @*//WFITEM COMMENT TEMPLATE*@
      <script type="text/x-kendo-tmpl" id="itemCommentTemplate">
      <div class="step">
      <div class="step-wrapper">
      <dl class="step-list-details">
      <dt class="name"><b>Name:</b>#:CreatedByUserName# <b>Date:</b> #:CreatedDate#</dt>
      <dd class="stepNum">
      <b>Comment:</b>
      <div contenteditable="true">
      #:Comment#
      </div>
      </dd>

      <dd class="title">
      <b>Internal Comment:</b> #:InternalComment#
      </dd>
      <dd class="stepStatus">Status: Status Test</dd>
      </dl>
      <div class="btn btn-primary" id="viewStep">View</div>
      </div>
      </div>
      </script>


      I want my list text to render as it does in the grid with encoding set to false:



      enter image description here










      share|improve this question
















      Can I Set Encoded to False on a field of a Kendo Template for Kendo ListView?
      Here I have a grid over a list. As you can see in the list the rich text is being diaplayed as HTML where as in the Grid where enocding is set to False the RIch text is being displayed as text. Can I set encoding to false on the field I want ( Comment ) in the ListView? If not what are my options as I was unable to render an editor in the Kendo template... EDIT: Goal is to remove Grid I want the list only.



       @(Html.Kendo().Grid<WorkflowItemCommentModel>()
      .Name("Grid")
      .Columns(columns =>

      columns.Bound(e => e.Comment).Width(300).Encoded(false);

      )
      .DataSource(dataSource => dataSource
      .Ajax()
      .Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"))

      )
      )
      <div class="col-sm-2"></div>
      <div id="comments-list" class="col col-sm-10">

      @(Html.Kendo().ListView<WorkflowItemCommentModel>()
      .Name("CommentList")
      .TagName("div")

      .Events(e => e.DataBound("onCommentListDataBound").Change("onCommentCriteriaChange"))
      .ClientTemplateId("itemCommentTemplate")
      .DataSource(dataSource =>

      dataSource.Read(read => read.Action("CommentsRead", "WFItem").Data("getWorkflowItemID"));
      dataSource.Sort(sort => sort.Add(f => f.CreatedDate); ).ServerOperation(false);
      )
      .Selectable(s => s.Mode(ListViewSelectionMode.Single))
      )


      Template:



       @*//WFITEM COMMENT TEMPLATE*@
      <script type="text/x-kendo-tmpl" id="itemCommentTemplate">
      <div class="step">
      <div class="step-wrapper">
      <dl class="step-list-details">
      <dt class="name"><b>Name:</b>#:CreatedByUserName# <b>Date:</b> #:CreatedDate#</dt>
      <dd class="stepNum">
      <b>Comment:</b>
      <div contenteditable="true">
      #:Comment#
      </div>
      </dd>

      <dd class="title">
      <b>Internal Comment:</b> #:InternalComment#
      </dd>
      <dd class="stepStatus">Status: Status Test</dd>
      </dl>
      <div class="btn btn-primary" id="viewStep">View</div>
      </div>
      </div>
      </script>


      I want my list text to render as it does in the grid with encoding set to false:



      enter image description here







      razor kendo-ui kendo-asp.net-mvc richtext






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 7 at 17:24







      Ray Koren

















      asked Mar 7 at 17:17









      Ray KorenRay Koren

      447517




      447517






















          1 Answer
          1






          active

          oldest

          votes


















          1














          Yes, you can use #=Comment# to force the template to not encode the output. See this example from the documentation:



          <div id="example"></div>
          <script>
          var template = kendo.template("<div id='box'>#= firstName #</div>");
          var data = firstName: "<b>Todd</b>" ; //Data with HTML tags
          var result = template(data); //Pass the data to the compiled template
          $("#example").html(result); //display "Todd" in a bold font weight
          </script>


          Be aware that this might expose your site to a cross-site scripting (XSS) vulnerability. At the very least, you will probably want to ensure that the data doesn't contain any <script> tags.






          share|improve this answer























          • THANK YOU!!!! :)

            – Ray Koren
            Mar 7 at 18:20










          Your Answer






          StackExchange.ifUsing("editor", function ()
          StackExchange.using("externalEditor", function ()
          StackExchange.using("snippets", function ()
          StackExchange.snippets.init();
          );
          );
          , "code-snippets");

          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "1"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049504%2fcan-i-set-encoded-to-false-on-a-field-of-a-kendo-template-for-kendo-listview%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          1














          Yes, you can use #=Comment# to force the template to not encode the output. See this example from the documentation:



          <div id="example"></div>
          <script>
          var template = kendo.template("<div id='box'>#= firstName #</div>");
          var data = firstName: "<b>Todd</b>" ; //Data with HTML tags
          var result = template(data); //Pass the data to the compiled template
          $("#example").html(result); //display "Todd" in a bold font weight
          </script>


          Be aware that this might expose your site to a cross-site scripting (XSS) vulnerability. At the very least, you will probably want to ensure that the data doesn't contain any <script> tags.






          share|improve this answer























          • THANK YOU!!!! :)

            – Ray Koren
            Mar 7 at 18:20















          1














          Yes, you can use #=Comment# to force the template to not encode the output. See this example from the documentation:



          <div id="example"></div>
          <script>
          var template = kendo.template("<div id='box'>#= firstName #</div>");
          var data = firstName: "<b>Todd</b>" ; //Data with HTML tags
          var result = template(data); //Pass the data to the compiled template
          $("#example").html(result); //display "Todd" in a bold font weight
          </script>


          Be aware that this might expose your site to a cross-site scripting (XSS) vulnerability. At the very least, you will probably want to ensure that the data doesn't contain any <script> tags.






          share|improve this answer























          • THANK YOU!!!! :)

            – Ray Koren
            Mar 7 at 18:20













          1












          1








          1







          Yes, you can use #=Comment# to force the template to not encode the output. See this example from the documentation:



          <div id="example"></div>
          <script>
          var template = kendo.template("<div id='box'>#= firstName #</div>");
          var data = firstName: "<b>Todd</b>" ; //Data with HTML tags
          var result = template(data); //Pass the data to the compiled template
          $("#example").html(result); //display "Todd" in a bold font weight
          </script>


          Be aware that this might expose your site to a cross-site scripting (XSS) vulnerability. At the very least, you will probably want to ensure that the data doesn't contain any <script> tags.






          share|improve this answer













          Yes, you can use #=Comment# to force the template to not encode the output. See this example from the documentation:



          <div id="example"></div>
          <script>
          var template = kendo.template("<div id='box'>#= firstName #</div>");
          var data = firstName: "<b>Todd</b>" ; //Data with HTML tags
          var result = template(data); //Pass the data to the compiled template
          $("#example").html(result); //display "Todd" in a bold font weight
          </script>


          Be aware that this might expose your site to a cross-site scripting (XSS) vulnerability. At the very least, you will probably want to ensure that the data doesn't contain any <script> tags.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 18:04









          Joe GloverJoe Glover

          48138




          48138












          • THANK YOU!!!! :)

            – Ray Koren
            Mar 7 at 18:20

















          • THANK YOU!!!! :)

            – Ray Koren
            Mar 7 at 18:20
















          THANK YOU!!!! :)

          – Ray Koren
          Mar 7 at 18:20





          THANK YOU!!!! :)

          – Ray Koren
          Mar 7 at 18:20



















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55049504%2fcan-i-set-encoded-to-false-on-a-field-of-a-kendo-template-for-kendo-listview%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme

          Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

          2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived