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

Troubleshooting template errors

2 Answers 32 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Scott
Top achievements
Rank 1
Scott asked on 13 Aug 2015, 07:27 PM
I am adding a template to an existing grid that's been working fine for a while. I keep getting an invalid template error but I don't see anything wrong with the template. I have other templates for other grids that work just fine and the code is very similar. Is there a good way to troubleshoot this type of problem? Perhaps a way to output a more detailed error message? The current invalid template error message only tells you that there is a problem and is not helpful in figuring out what the problem is. 

2 Answers, 1 is accepted

Sort by
0
Scott
Top achievements
Rank 1
answered on 14 Aug 2015, 06:37 PM

I finally found the problem. When I copied one of my templates visual studio decided to add =#" in the middle of the template in what I can only guess was visual studio trying to be helpful and correct what it perceived as a syntax error. This was very difficult to notice and I didn't even think to double check this part since I was copying the code from a known working template.

0
Alexander Valchev
Telerik team
answered on 17 Aug 2015, 10:26 AM
Hi Scott,

I am glad to hear that you managed to resolve the issue. Generally speaking the 'invalid template error' is always caused by an extra or missing hash.

In cases where you intentionally added a hash that is not part of the template syntax you should escape it.

Regards,
Alexander Valchev
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
Scott
Top achievements
Rank 1
Answers by
Scott
Top achievements
Rank 1
Alexander Valchev
Telerik team
Share this question
or