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

How to Properly escape a hash in a foreign key column

1 Answer 62 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Adam
Top achievements
Rank 1
Adam asked on 22 Oct 2013, 12:13 PM
some of the data in my foreign key column (loaded from database) contains a # character. How do I properly escape that?

I am loading data just like the foreign key column example in the MVC example.

Without doing anything the grid fails to load and display anything.

I tried a single backspace "\#" (controller complains not proper escape sequence)

I used a double "\\#" which loads the grid but displays Item \#1 vs. Item #1

What is the proper way to escape this # character?

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Oct 2013, 11:25 AM
Hello Adam,

The easiest option is to use a custom template for the column so that the data is not added to the template. I attached a sample project that demonstrates this scenario. 

Regards,
Daniel
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Tags
Grid
Asked by
Adam
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or