E
egarcia
Guest
Hello, You are very welcome. I am glad that you liked our presentation. Just curious. Are doing mobile development, web development or both? Are you using the Views service in Telerik Platform? Here is a link to the documentation on the JSDO: I am assuming that the advance case that you are working on is somewhat similar the following example from the Kendo UI demo site: The hierarchy example using nested Kendo UI Grids. Please provide more information on your advance case if it is not similar that example. To work with hierarchical data, you can have two resources with one table each in the catalog or one resource with a dataset with two tables. To define a data source for a Kendo UI component, you would either specify the data source definition inline for the dataSource property or create a separate DataSoource instance if you need to refer to it. If you are using a Kendo UI Grid and define the data source inline, you could use access the DataSource instance in the following way: $("#grid").data("kendoGrid").dataSource If you need to work with the JSDO API, you can access the JSDO instance by using the following code: $("#grid").data("kendoGrid").dataSource.transport.jsdo The main properties for the data source definition are the following: - type: "jsdo" : to indicate that you are creating an instance of a JSDO DataSource - transport.jsdo : to specify the JSDO instance for the DataSource. You can use a string with the name of the resource, in which case, the JSDO instance is created internally, or you can use an existing JSDO instance. - transport.tableRef : optional parameter that is used to specify the name of the temp-table to use for the DataSource. Example: dataSource: { type: "jsdo", transport: { jsdo: jsdoInstance, tableRef: "eCustomer" } }, If you create separate instances, then the JSDOs would be independent. There is a mode that we have not documented where you use the same instance of the JSDO with more than one Kendo UI DataSource. For this mode, you would also need to use a couple of additional properties for the transport: - readLocal (true/false): when this property set to true the JSDO would use the data in the JSDO memory instead of reading the data via fill()/read() from the server. - autoSave (true/false): when this property is set to false, the JSDO would not automatically save the changes to the server by calling saveChanges(). Instead, the changes would remain in the JSDO memory and you would need to call saveChanges() directly or indirectly from a Kendo UI DataSource. Example: dataSource: { type: "jsdo", transport: { jsdo: jsdoInstance, tableRef: "eOrder", readLocal: true }, error: function (e) { console.log("Error: ", e); }, filter: { field: "CustNum", operator: "eq", value: e.data.CustNum } }, Here is an example using nested Kendo UI Grids (read-only): This example is based on the one mentioned previously. Please let me know if you need more information. I hope this helps.
Continue reading...
Continue reading...