I am absolutely new to Kenod and all it attached features and needed tasks - so please forgive me.
I was able to retrieve data from my sql database and bind it to a tabstrip.
However when I try to filter (remember I am actually clueless what I am doing) its not working.
1) http://docs.kendoui.com/api/framework/datasource the syntax looks like
If I search the web I mostly find fiields operator and value in""
Does it matter?
Which is correct?
2) this are two ways I tried and both did not work. Any suggestions?
Try # 1
Try #2
Any help is appreciated, and please forgive me if these questions are to clear.
Markus
I was able to retrieve data from my sql database and bind it to a tabstrip.
var dsBuecherAT = new kendo.data.DataSource( { transport: { read: { url: "/api/t_buechers", dataType: "json" } } }); $("#buecherAT").kendoTabStrip({ dataTextField: "Buch", dataContentField: "Buch_ID", dataSource: dsBuecherAT });1) http://docs.kendoui.com/api/framework/datasource the syntax looks like
var dataSource = new kendo.data.DataSource({ data: [ { name: "Jane Doe" }, { name: "John Doe" } ], filter: { field: "name", operator: "startswith", value: "Jane" }});Does it matter?
Which is correct?
var dataSource = new kendo.data.DataSource({ data: [ { name: "Jane Doe" }, { name: "John Doe" } ], filter: { "field": "name", "operator:" "startswith", "value:" "Jane" }});2) this are two ways I tried and both did not work. Any suggestions?
Try # 1
//we are getting the kapitels function getKapitels(buch_ID) { alert(buch_ID); var dsKapitels = new kendo.data.DataSource({ transport: { read: { url: "/api/t_kapitels", dataType: "json" } } }); $("#kapitel").kendoTabStrip({ dataTextField: "Kapitel_ID", dataContentField: "Buch_ID", dataSource: dsKapitels.filter({ field: "Buch_ID", operator: "eq", value: "1" }) }) }//we are getting the kapitels function getKapitels(buch_ID) { alert(buch_ID); var dsKapitels = new kendo.data.DataSource({ transport: { read: { url: "/api/t_kapitels", dataType: "json" } }, filter: { field: "Buch_ID", operator: "eq", value: "1" } }); $("#kapitel").kendoTabStrip({ dataTextField: "Kapitel_ID", dataContentField: "Buch_ID", dataSource: dsKapitels }) }Any help is appreciated, and please forgive me if these questions are to clear.
Markus