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

[Solved] Inline (Batch) edit issue - string editor template with 't-input' class applied

1 Answer 105 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Grant Drury-Green
Top achievements
Rank 1
Grant Drury-Green asked on 17 Jul 2012, 12:35 AM
I've been facing an issue for a few weeks - and I've finally discovered the cause.

I have a grid set up for batch edit mode. The grid has some standard bound columns (bound to a string property), and some bound via foreign key.

The strange thing is that I have been able to successfully edit the foreign key columns, but not the string values. As soon as I leave edit mode on the string column, the value is reverting back to the original.

I eventually tracked it down to my editor template for string:
       \Views\Shared\EditorTemplates\String.cshtml

@model String
 
@Html.TextBoxFor(m => m, new { @class = "t-input" })

If I take out the  new { @class = "t-input" } it all works fine. Strangely,I can supply different HTML attributes and it also works fine, I can also supply a different class name. It seems only that the t-input class is causing the issue. (NOTE: I am using the Metro styles)

Can others replicate this issue?


1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 19 Jul 2012, 07:28 PM
Hello Grant Drury-Green,

The value is not updated because the selector used for getting the value of inputs will ignore those with the "t-input" class. The Grid uses different client-side binders for the different type of editors and the class is used to distinguish the input Telerik Controls from the normal text inputs so that it can correctly retrieve the value. 

Regards,
Daniel
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Grid
Asked by
Grant Drury-Green
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or