This is a migrated thread and some comments may be shown as answers.

#= vs #: in Grid Binding

1 Answer 9 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Veteran
Eric asked on 26 Aug 2020, 12:02 PM

Is there a difference between using "#=" and "#:" when blocking references in my column bindings?  They both seem to work for me, and I wanted to make sure one isn't preferred over the other for certain situations.  Thank you.

columns.Bound(prac => prac.PractitionerId).ClientTemplate("<input type='checkbox' name='chkPractitioner' value='#= PractitionerId #' onclick='handleProviderSelected(this,#= LocationId #)' />").Width(45).HeaderTemplate(" ");

1 Answer, 1 is accepted

Sort by
0
Accepted
Tsvetomir
Telerik team
answered on 28 Aug 2020, 07:19 AM

Hi Eric,

There is a slight difference in how the values from the templates are interpreted:

 #= # -> Render values as HTML
#: # -> Use HTML encoding to display values
More information could be found in the dedicated documentation article for the templates here:

https://docs.telerik.com/kendo-ui/framework/templates/overview#template-syntax

 

Regards,
Tsvetomir
Progress Telerik

Five days of Blazor, Angular, React, and Xamarin experts live-coding on twitch.tv/CodeItLive , special prizes and more, for FREE?! Register now for DevReach 2.0(20).

Tags
Grid
Asked by
Eric
Top achievements
Rank 1
Veteran
Answers by
Tsvetomir
Telerik team
Share this question
or