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
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:
razor kendo-ui kendo-asp.net-mvc richtext
add a comment |
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:
razor kendo-ui kendo-asp.net-mvc richtext
add a comment |
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:
razor kendo-ui kendo-asp.net-mvc richtext
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:
razor kendo-ui kendo-asp.net-mvc richtext
razor kendo-ui kendo-asp.net-mvc richtext
edited Mar 7 at 17:24
Ray Koren
asked Mar 7 at 17:17
Ray KorenRay Koren
447517
447517
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
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.
THANK YOU!!!! :)
– Ray Koren
Mar 7 at 18:20
add a comment |
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
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
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.
THANK YOU!!!! :)
– Ray Koren
Mar 7 at 18:20
add a comment |
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.
THANK YOU!!!! :)
– Ray Koren
Mar 7 at 18:20
add a comment |
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.
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.
answered Mar 7 at 18:04
Joe GloverJoe Glover
48138
48138
THANK YOU!!!! :)
– Ray Koren
Mar 7 at 18:20
add a comment |
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
add a comment |
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.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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