Hello ,
I'm preaty new to the programing and Kendo UI. But i have a task to make a grid and in it i should be able to edit/delete/update/create data in Json file.
After watching demo a question popped up in my head.
How does this part of code work :
var dataSource = new kendo.data.DataSource({
transport: {
read: "/Products", update: {
url: "/Products/Update",
type: "POST"
},
destroy: {
url: "/Products/Destroy",
type: "POST"
},
create: {
url: "/Products/Create",
type: "POST"
}
Specialy those parts with [ url: "/Products/Create" ] .
What should i do to get it ? I use XAMPP test server and use my URL which is "localhost:8080/TestJson.json".
Replacing it with my URL doesnt do much.
var Pfad = "http://localhost:8080",
dataSource = new kendo.data.DataSource({
transport: {
read: {
url: Pfad + "/TestJson.json",
dataType: "json"
},
update: {
url: Pfad + "/TestJson.json",
dataType: "json",
type: "POST"
},
destroy: {
url: Pfad + "/TestJson.json",
dataType: "json",
type: "POST"
},
create: {
url: Pfad + "/TestJson.json",
dataType: "json",
type: "POST"
},
All it does is populate my Grid , but i can't edit or delete anything in that Json file.
I know that it is wrong but i can't find a solution. Maybe there is a page where i can read about it.