Hi
been trying to find a solution to a problem i have trying to solve over the last few days and beginning to wonder if its even possible.
I have set up a "Dojo" with all the code snippets which can be found here - http://dojo.telerik.com/aBuVul/7
The issue stems from the need to be able to reference data with a name that may contain hyphen in a template.
an example can be seen below, more details examples can be seen on the Dojo link above
var DashFirstName = "first-name",
dashData = new kendo.data.DataSource({
data: [
{"first-name": "Joe", "country": "Germany"},
{"first-name": "Jane", "country": "UK"},
{"first-name": "Maria", "country": "Spain"}
]
});
$("#grid2").kendoGrid({
dataSource:dashData,
columns: [{
field: "[\"first-name\"]",
test: "22",
title: "First Name",
template: "<input type='radio' name='#= data." + DashFirstName + "#'>#= data." + DashFirstName + "#",
width: 200
}, {
field: "country",
title: "Country"
}]
});
I've tried various escapes to no avail... Any ideas would be greatly appreciated.
Our application makes repeated calls to the spreadsheet control, sometimes numbering in the tens of thousands. The application logic sets cell values, then reads back the value of other, calculated cells.
Execution speed gets slower and slower over time. For example with a simple spreadsheet, I can run 500 iterations in roughly 10 seconds. The second block of 500 iterations takes 27 seconds and the 3rd block of 500 iterations takes 44 seconds. As a rough approximation, there is an exponential fall-off in performance, presumably due to memory-allocations internally.
The problem manifests itself in the cell SetValue() method. Initially, this method returns control to the calling program in less than 1ms. But after say, 1500 iterations, this method is taking 200 to 300ms.
In case it helps with reproducing the problem: this delay only occurs if SetValue() follows a call to the cell GetValue() method. If GetValue() does not get called, then repeated calls to the SetValue() method happen quickly, in <1ms
Am hoping there is an easy fix for this.
Regards,
Mike Wiese
Dunsborough
Western Australia
/** * This is a security dashboards controller */define([ 'wsipccontext', 'jquery', 'underscore', 'utils/helpers', 'utils/alerts', 'kendoui/kendo.core.min', 'kendoui/kendo.data.min', 'kendoui/kendo.splitter.min', 'kendoui/kendo.panelbar.min', 'kendoui/kendo.grid.min'], function (WSIPCContext, $, _, Helpers, Alerts, studentDetailTemplate) { //PRIVATE PROPERTIES var ksCharts, ksMain, kgSecurityGrid, ksChartsAndGrid, kpbContent, firstPass, nextRead, dsSchoolRiskFactors; //CONSTRUCTOR var init = function () { //ON DOC READY $(function () { initElements(); onInitialLoad(); }); }; var init1 = function () { //ON DOC READY $(function () { onInitialLoad(); }); }; //EVENTS var initElements = function () { firstPass = true; nextRead = false; ksMain = $("#main").kendoSplitter({ orientation: "horizontal", panes: [{ size: "240px", collapsible: true, scrollable: true }] }).data("kendoSplitter"); kpbContent = $("#linkPanel").kendoPanelBar().data("kendoPanelBar"); kpbContent.append([ { text: "Additional Dashboards", content: "<a href='/DistrictEWSDashboard/'><img src='/assets/images/EWS District TN.png' /> <a href='/admindashboards/'><img src='/assets/images/EWS School TN.png' /> </a><a href='/StudentEWSDashboard/'><img src='/assets/images/EWS Student.png' /> </a><a href='/AdminDashboards.aspx/'><img src='/assets/images/Portal-big.png' /></a>" } ]); kpbContent = $("#panelBar").kendoPanelBar().data("kendoPanelBar"); kpbContent.element.find("#comparativeDashboardPanelContents").css("height", "1104px"); kpbContent.element.find("#gridPane").css("height", "770px"); kpbContent.expand(kpbContent.element.find("li:first")); kgSecurityGrid = $("#securityGrid").kendoGrid({ scrollable: true, columns: [ { field: "Username", title: "User Name", width: 150, editable: false }, { field: "FreeReduced", title: "Free and Reduced", width: 50 }, { field: "SpecEd", title: "Spec Ed", width: 60 }, { field: "Discipline", title: "Discipline", width: 50 }, { field: "Assessment", title: "Assessment", width: 50 }, { field: "Activities", title: "Activities", width: 50 }, { command: ["destroy"], title: " ", width: "172px" }, ], dataSource: { transport: { read: function (options) { if (!(kgSecurityGrid)) { options.success([]); return; } kendo.ui.progress(kgSecurityGrid.element, true); $.getJSON(Helpers.toServicesUrl("/GetctrlSecurityInfo"), { userName: WSIPCContext.UserName, districtId: WSIPCContext.DistrictId }, function (data) { options.success([]); kgSecurityGrid.dataSource.data(data.GetctrlSecurityInfoResult.RootResults); }).always(function () { kendo.ui.progress(kgSecurityGrid.element, false); }); }, update: function (options) { if (!(kgSecurityGrid)) { // options.success([]); // return; } kendo.ui.progress(kgSecurityGrid.element, true); $.postJSON(Helpers.toServicesUrl("/GetupdateSecurityInfo"), { userName: WSIPCContext.UserName, districtId: WSIPCContext.DistrictId, UserToUpdate: "wise\lhedman", Role: "Teacher", FnR: "yes", SpecEd: "yes", Assess: "yes", Discipline: "yes", Activites: "yes", MSDAdmin: "no" }, function (data) { options.success([]); // kgSecurityGrid.dataSource.data(data.GetupdateSecurityInfoResult.RootResults); }).always(function () { kendo.ui.progress(kgSecurityGrid.element, false); });// type: "POST" } }, sort: { field: "Username", dir: "asc" }, schema: { model: { fields: { Username: { type: "string", editable: false }, FreeReduced: { type: "string" }, SpedEd: { type: "string" }, Discipline: { type: "string" }, Assessment: { type: "string" }, Activities: { type: "string" } } } }, pageSize: 15, batch: true, page: 1 }, pageable: true, sortable: true, groupable: true, filterable: true, resizable: true, height: 760, toolbar: ["create", "save", "cancel"], editable: true }).data("kendoGrid"); $("#applyFilters").css('display', 'none'); kgSecurityGrid.dataSource.read(); }; //end of initelements //ACTIONS var index = function () { }; // var visitNodes = function (nodes, callback) { for (var i = 0; i < nodes.length; i++) { callback(nodes[i]); if (nodes[i].hasChildren) visitNodes(nodes[i].children.view(), callback) } }; var eachItemToJSON = function (items) { var result = new Array(items.length); for (var i = 0; i < items.length; i++) result[i] = items[i].toJSON(); return result; }; function onInitialLoad() { // $("#applyFilters").trigger("click"); }; //CALL CONSTRUCTOR init(); // init1(); //PUBLIC PROPERTIES return { index: index };});Hello,
I am looking at following example and I would like to get the index of the clicked item, how would I do that?
http://dojo.telerik.com/@korchev/amaK
Thanks
$(document).ready(function() { $("#grid").kendoGrid({ dataSource: { type: "odata", transport: { }, schema: { model: { fields: { OrderID: { type: "number" }, ShipCountry: { type: "string" }, ShipName: { type: "string" }, ShipCity: { type: "string" }, ShipAddress: { type: "string" } } } }, pageSize: 30, group: { field: "ShipName" } }, height: 540, sortable: true, reorderable: true, groupable: true, resizable: true, filterable: true, columnMenu: true, pageable: true, columns: [ { field: "OrderID", title: "Order ID", locked: true, lockable: false, width: 50 }, { field: "ShipCountry", title: "Ship Country", width: 300 }, { field: "ShipCity", title: "Ship City", width: 300 },{ field: "ShipName", title: "Ship Name", width: 300 }, { field: "ShipAddress", width: 400 } ] }); });Hi,
We are trying to use the Telerik Testing Studio to automate testing.
We're running into problems testing Kendo UI charts, since there's no way to hook to the series in the chart.
Is there a way to configure the chart to add classes (or ids or any other usable attributes) to each of the series (and to each of the bars in the series in case of stacked bar chart) ?
If not, how can we use your tool to inspect your widgets ?
Thanks in advance
Hi!, i0m triying to use the event change to capture when user push the Backbutton but the event Change (args e.backButtonPressed) is allways true:
I'm missing something?
The app navigate when user push on link like this <a href="/#previsiones">Previsiones</a>
01.SAOO.Routes = function () {02. var router = new kendo.Router({03. root: "/",04. 05. routeMissing: function (e) {06. 07. },08. back: function (e)09. {10. 11. 12. SAOO.theme.page.leftMenu.change(e.url);13. },14. change: function (e) {15. 16. 17. if (SAOO.application.loaded==false)18. {19. SAOO.theme.page.leftMenu.change(e.url);20. }21. 22. 23. 24. 25. 26. 27. },28. root: "/"29. });Thx!!
<script type="text/x-kendo-tmpl" id="CompanyTemplateEdit"> ...
...
<dt>State</dt>
<dd> <input id="ddlState${CompanyID}" data-bind="value:State" name="State" /> #renderDDLStates(data)# </dd> <dt>Postal Code</dt> <dd> <input type="text" data-bind="value:PostalCode" name="PostalCode" required="required" validationMessage="required" /> <span data-for="PostalCode" class="k-invalid-msg"></span> </dd> </dl> </div> </script>
$(document).ready(function () { listView.kendoListView({ dataSource: CompanySource, template: kendo.template($("#CompanyTemplate").html()), editTemplate: kendo.template($("#CompanyTemplateEdit").html()) }).data("kendoListView"); }); var listView = $("#company_list"); var CompanySource = new kendo.data.DataSource({ transport: { read: { url: "/api/Company/" + $.cookie("C1AuthCompanyID"), }, update: { url: "/api/Company/" + $.cookie("C1AuthCompanyID"), type: "PUT", } }, schema: { model: { id: "CompanyID", fields: { CompanyID: { editable: false, nullable: true }, ParticipantID: { type: "number" }, CompanyName: "CompanyName", DBA: "DBA", CompanyNumber: "CompanyNumber", Street1: "Street1", Street2: "Street2", City: "City", State: "State", PostalCode: "PostalCode", isApproved: { type: "boolean" }, isActive: { type: "boolean" }, isDeleted: { type: "boolean" } } } } }); function renderDDLStates(data) { $("#ddlState" + data.CompanyID).kendoDropDownList({ dataTextField: "stateName", dataValueField: "stateCode", dataSource: [ { stateName: "Texas", stateCode: "TX" }, { stateName: "Pennsylvania", stateCode: "PA" } ] }); }