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

Hierarchical Grid popup editing template problems

0 Answers 124 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shawn
Top achievements
Rank 1
Shawn asked on 01 Aug 2019, 06:19 PM

Hello,

I have a kendo grid that contains child grid(s) that get created by using the "ClientDetailTemplateId".  I want to be able to edit the rows in the child grid via a PopUp editor.  The problem is that when I use HtmlHelper or TagHelper tags such as (@(Html.Kendo().NumericTexBoxFor(model => model.column).... or 'kendo-numerictextbox .../>), Validation span tags such as (<span asp-validation-for="TextBox" class="text-danger"></span>), or any sort of JavaScript within <script> tags, in my editor's template file I get an error that the template is not formed correctly. 

Also, if my model has a "Range" attribute such as "[Range(0, long.MaxValue, ErrorMessage = "Value must be positive")]", the numeric text box HTML helper causes the same error that the template is not formed correctly.

I realize that within templates JavaScript has a different notation such as #if(a=b){# ... #}#.  However this type of notation doesn't work either.  For example, I would like to include the following JavaScript code under my kendo numeric text box so that when the user clicks inside the box the value within gets selected, but this code causes an error.

<script>
     $("#TextBox").focus(function () {
         var input = $(this);
         setTimeout(function () {
             input.select();
         });
     });
 </script>

 

I don't know what I'm doing wrong, and I can't find the right documentation that would describe how to get something like this scenario to work.   Any help is appreciated.  Thanks.

Shawn A.

 

 

No answers yet. Maybe you can help?

Tags
Grid
Asked by
Shawn
Top achievements
Rank 1
Share this question
or