Update: I think I poorly worded this question; the issue is not the data coming from the rest call, the issue is: I would like to simply restrict some columns in my data grid from accepting 'alpha' characters, i.e. only except number input when a user is attempting to edit the field inline.. for instance, alpha characters could simply not writing, would work. Surely there is a easy method with kendo to do such a simple thing.
I have setup an editable kendo grid with the logic below coming from the rest call below; it populates fine but now I am trying to simply restrict some of my columns to only accept their data types, i.e. starting out I'm trying to set latitude and longitude to only accept number values; after trying the below, adding fields under id - instead of any actual validation on the latitude field, it adds a second latitude column to the grid?
let dataSource = new kendo.data.DataSource({
transport: {
read: {
url: "/popGrid?id=" + which,
dataType: "json"
}
},
schema: {
data: "data",
model: {
id: id,
fields: { // attempt doesnt effect current latitude col, adds another
latitude: { editable: true, type: "number",validation: { required: true, min: 1 } },
}
}
},
});
Best way to go about this? I really don't want to hardcode each column out twice in order for a validation to take effect, I found one example doing so.. currently it's populating fine with my rest call and id model scheme dynamically, I just want to specify a few columns to only allow NUMBER input