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

How to avoid the automatic zero value in a Kendo int textbox from Grid Edit screen or inline edit?

1 Answer 242 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ed
Top achievements
Rank 1
Veteran
Ed asked on 25 Oct 2020, 12:28 AM

I am using asp.net mvc kendo tools. I have a int property from my c# model side, see below:

 

public class MyModel

{

[Required]

public int MyIntField {get;set;

}

 

in the view side I am adding the column using Kendo Grid selector
...

.Columns(c => c.Bound(my=>my.MyIntField))

...

 

That field always shows with zero when an edit popup screen is called. How can I avoid that still keeping the automatic required UI validations and without messy changing the DOM directly using javascript?
I'm looking for a kendo selector solution or a c# attribute side solution. But maybe I am asking for too much.

thanks

1 Answer, 1 is accepted

Sort by
0
Martin
Telerik team
answered on 27 Oct 2020, 04:18 PM

Hello Ed,

Could you please review and modify the attached solution to reproduce the problem you are experiencing? I will then be able to test it and see what is causing the behavior.

Normally you can change the editor for a column through the column.editor configuraiton. Here is a small example for reference.

Let me know if the above was helpful.

Regards,
Martin
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Grid
Asked by
Ed
Top achievements
Rank 1
Veteran
Answers by
Martin
Telerik team
Share this question
or