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 find variable: document ReactNative Js2019 Community Moderator ElectionReactNative: how to center text?Can't find variable: navigate - ReactNative navigationReact Native error: “Can't find variable: TouchableHighlight”How to use Expo.DocumentPicker.getDocumentAsync properly. [Expo] [ReactNative]Can't find variable: regeneratorRuntime (ReactNative)Reactnative Expo It is advisable for a StartUp?Can't find variable : Self / Can't install firebaseNPM Install Error in installing ReactNative CLIContacts Displaying in App using ReactnativeFacebook login error: can't find variable: Alert

          Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

          Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices