<div id="totalHours">
</div>
<script>
var griddataSource = new kendo.data.DataSource({
transport: {
read: {
url: '@Url.Action("List", "GLID")',
dataType: "json",
success: function (result) {
var totalHours = result.totalhr;
}
},
schema: {
data: "data",
total: "total",
}
});
griddataSource.read();
$("#grid").kendoGrid({
dataSource: griddataSource,
toolbar: ["excel"],
dataBound: function(e) {
resizeGrid(e);
var totalHours = e.totalhr; // ****** I want to update the value of totalHour
$("#totalHours").text("Total new Hours: " + totalHours);
},
columns: [
]
});
</script>
var totalHours = list.Sum(item => item.Hours);
return Json(new { total = total, totalhr = totalHours, data = data }, JsonRequestBehavior.AllowGet);
We are currently experiencing a rendering issue with the KendoUI TreeView component, version 2019.2.703, on Project Server Online. This problem arose following a recent update to Project Online, which introduced a change in how the WebComponentsIcons font, used for icon rendering, is managed in the cloud environment.
Issue Details:
Previously, the grid component functioned correctly. However, after the update, labels in combo boxes that contain hierarchical items (years and months in our case) are not displaying correctly. Specifically, the label for the year is now rendering "behind" he checkbox and is only partially visible within the interface.
See attachment: TreeView_err1.png
Attempted Fixes and Complications:
We attempted a solution that successfully made the year label visible again modifying the style of the class .k-treeview .k-in (setting the Font Family and size).
.k-treeview .k-in {However, this adjustment led to an unintended change in the Document Object Model, and an empty <span> cover the checkbox and partially blocked the selection of the checkbox.
See attachment: TreeView_err2.png
To avoid the conflict between the checkbox and the empty span we modified the style of the .k-icon class changing the display from inline-block to display: contents;
Now, the trigger, originally on the triangle icon for showing/hiding child items (months), is incorrectly positioned above the checkbox for selecting the year. This results in all child items being expanded and displayed when the parent is selected, which is not the desired behaviour.
See attachment: TreeView_err3.png
Attachments:
Please find attached screenshots for a better understanding of the issues described.
Request:
Could you please investigate this behaviour? Any suggestions on how to correct the year label rendering without affecting the functionality of the child item display would be greatly appreciated.
Hi Team,
Is there any way to set the pattern color and pattern style of a cell before exporting to excel using jQuery?
Thanks,
Julian A
I've got a kendo bar chart that I'm applying a font to but when I do, the labels are no longer aligned. using the default for the chart renders fine. How do I fix this?
Hello
I want to use the REST settings to do the updates. So I have a question while using saveChanges on grid
I want to each submit for created, updated, and destroyed, is there a way?
Hi,
Actually two questions.
(1)If a user imports their excell spreadsheet with formulas, styles and values, is it converted into JSON and viewable by access the sheets property of the Spreadsheet? Does the spreadsheet control convert the excell properties into the sheets property (in JSON)? Is it converted like this:
Ideally, we would have one sheet with all the styles and formulas (really just references to other sheets with actual values) and the data would be referred to as a formula in the first sheet like this:
The value for cell A3 is in the formula, it is just referring to a cell in Sheet1; Sheet1!A1.
Is there any way to grab the multi sheet spreadsheet (sheets property I guess) as a JSON object and send it to an API? I see most of the examples have the sheet statically defined in the initialization of the of the component, then the data is bound from a separate dataSource.
I already did an experiment with swapping sheets, and this was somewhat successful, but the next step is to actually grab that sheets property from an API and somehow use the fromJSON() function to place the spreadsheet into the control, in addition to saving it off using JSON to an API.
I understand that it is easier to define the sheets statically when initializing the spreadsheet component, but I need a way to dynamically change the styles and save them off to an API.
Thanks,
George
Can someone tell me how I can align my last element to the right while the others stay to the left please? i am working with asp.net mvc core 8
@(Html.Kendo().Menu()
Hello
I have a question while using saveChanges on grid
I want to generate sync for created, updated, and destroyed, is there a way?
Hi,
Need to figure out the proper way to attach a new sheet. to the kendoSpreadsheet's option: sheets. I tried the below code:
$(document).ready(function () {
//render and initialize kendoSpreadsheet:
$("#spreadsheet").kendoSpreadsheet({
columns: 20,
rows: 200,
toolbar: true,
sheetsbar: true,
sheets: mySheets,
width: "100%"
});
//render and initialize kendoButton:
$("#load-new-sheet-btn").kendoButton({
icon: "forward",
themeColor: "primary",
click: swapSheets // want to render new set of sheets. Is this possible?
});
});
//assign a different JavaScript object to the sheets: option parameter (this doesn't seem to refresh the spreadsheet component/control:
function swapSheets()
{
var currSpreadSheet = $("#spreadsheet").data("kendoSpreadsheet");
console.log("BEFORE clearing sheets: currentSpreadSheet contents: ", currSpreadSheet.options.sheets)
currSpreadSheet.options.sheets = mySheetsTwo;
console.log("AFTER clearing sheets: currentSpreadSheet contents: ", currSpreadSheet.options.sheets);
currSpreadSheet.refresh();
}
You can see the whole code in action here in the Dojo:
Spreadsheet Demo Swapping Sheets | Kendo UI Dojo (telerik.com)
Also, my requirements want to load a stylized formatted sheet (ergo probably a sheet object), and X number of sheets with raw data…with a different dataSource associated to those raw data sheets.
The ultimate goal is to load data into a sheet object in from an API without rerendering the entire page or destroying the current spreadsheet component (and creating a new one). Most importantly, or we can constrain the question to how to point sheets: to a new JSON sheet structure.
Here is a screen shot of what is happening:
It seems like I can re-assign the sheets object, but refreshing or binding the new sheets object is not being done successfully.
Hope this all makes sense,
George
We are trying to Update kendo from 2020.3.1021 to 2024.1.319, we download the version and then we just copy the kendo.all.min.js, but when we start running the application the drop downs are all oversize, the arrow grouping for the grids is black, but the main thing is we use the kendoMobileSwitch, but every where we try to use we get the error "Uncaught TypeError: $(...).kendoMobileSwitch is not a function".
The questions is, do we need to add any additional js reference file to use this function ?
this is how all the drop downs were affected.
this is the arrow grouping image that is back
and the js error is when we try to call like this: $("#element").kendoMobileSwitch({ checked: true });, we get the error "Uncaught TypeError: $(...).kendoMobileSwitch is not a function"