Kendo does Not render if data contains hash (#) when using ToClientTemplate in TileLayout.

0 Answers 67 Views
TextArea TileLayout
Richard
Top achievements
Rank 1
Richard asked on 24 Jan 2023, 01:02 AM | edited on 24 Jan 2023, 01:04 AM

Hi!

I'm using the TileLayout which needs BodyTemplateId to Render. Inside my assigned BodyTemplateId I have this code below which works if the data from Address does not contain a hash (#) character. Say, the Address from the database is "UNIT #1 ABC BLDG" will not render the TextArea.

Code:

<script id="address-template" type="text/x-kendo-template">

      <div class="row">

           <div class="text-left col-md-1">

                 @Html.LabelFor(m => m.CompleteAddress, "Address")
        </div>
        <div class="col-md-5">
              @(Html.Kendo().TextAreaFor(m => m.CompleteAddress).Rows(2)
                .Readonly(true)
                .ToClientTemplate()
              )
        </div>

      </div>

</script>

 @(Html.Kendo().TileLayout()
        .Name("TileLayout")
        .Columns(4)
        .RowsHeight("20px")        
        .Containers(c =>
        {
            c.Add().BodyTemplateId("address-template").ColSpan(4).RowSpan(6);
        })        
    )

 

What to do?

Thanks!

RGA

No answers yet. Maybe you can help?

Tags
TextArea TileLayout
Asked by
Richard
Top achievements
Rank 1
Share this question
or