Hi,
I'd like to export to Excel all the columns defined in a grid datasource (the dataItem has all the properties I need) but not displayed in the grid itself.
How can I achieve this?
Thanks,
Enrico
So I have an MVVM Grid set up and a toolbar with a button intended to refresh the grid data within the current view.
When searching for grid refresh functionality I came across this thread on stack : (http://stackoverflow.com/questions/18399805/reloading-refreshing-kendo-grid)
Which recommends using:
$('#GridName').data('kendoGrid').dataSource.read();
$('#GridName').data('kendoGrid').refresh();
In the button's click handling method these calls return an error and when I console.log($('#GridName').data('kendoGrid'));
it returns 'undefined'.
I have looked for read() and refresh() method in the grid object and have not found either in the grid or the dataSource etc.
What is the proper way to call refresh/reload on an MVVM Grid?
We're talking to an existing web service that is returning the data in a JSON format along these lines (excuse any format typos as this is mocked data):
{
"SelectedLocationID": 123,
"SelectedPeriodID": 234,
"DOBShifts": {
"Monday 9/21/2015": [
{
"ResultID": 1,
"DOB": "9/21/2015",
"JobID": 1,
"JobName": "Job 1",
"StartTime": "9/21/2015 12:00:00 PM",
"EndTime": "9/21/2015 4:00:00 PM",
"EmployeeName": "employee 1",
"EmployeeID": 1
"Color": " "
},
{
"ResultID": 2,
"DOB": "9/21/2015",
"JobID": 1,
"JobName": "Job 1",
"StartTime": "9/21/2015 1:00:00 PM",
"EndTime": "9/21/2015 5:00:00 PM",
"EmployeeName": "employee 2",
"EmployeeID": 2,
"Color": " "
}
],
"Tuesday 9/22/2015": [
...
]
}
}
Is there a way to bind the model fields to this nested JSON data, especially with the data stamps that will vary inside the DOBShifts node? Something like
taskId: { from: "DOBShifts.(formatteddate?).ResultID", type: "number" }
Or would a better approach be to pull this data into a separate function, format it in a simpler object, then map that datasource?
Thanks.
Hi,
after upgrading to typescript 1.6 I've got a compilation error in a piece of code that actually does work. I checked the definition file and I could not find any beforeSend at all! I'm using Kendo UI v2014.3.1411.
var dataSource = new kendo.data.DataSource({
transport: {
read: {
url: 'myApiUrl',
beforeSend: function (xhr) {
xhr.setRequestHeader('myAuthenticationHeader', 'myToken');
}
}
}
});
I have an AngularJS app and am currently trying to insert a Kendo Grid. I have a couple of questions about how to make this work.
transport: {
read: function(e) {
waiverService.getCustomers($scope.model.customer.CustomerID)
.success(function(data, status, headers, config) {
e.success(data);
});
}
}
2. My second issue is I have several dropdown boxes on each row of the grid. I have tried to use the information found in this example but I am getting a ReferenceError: getCategoryName is not defined.
Can anyone provide help with either of these issues?
Hi
I have pentaho BI (mondrian) with catalog and cube. I can connect to it with Excel and this driver http://sourceforge.net/projects/xmlaconnect/. Xmlaconnect make POST request with Authorization header, filled with my username/password.
But authentication is not needed in sample code for kendo pivottable for SSAS cube:
Sample from telerik:
read: {
url: "http://demos.telerik.com/olap/msmdpump.dll", //define the URL of the service
dataType: "text",
contentType: "text/xml",
type: "POST" }
In my case authentication is needed. I try to implement it by such code:
My case:
var pivotgrid = $("#pivotgrid").kendoPivotGrid({
...
read: {
url: "http://192.168.15.54:8080/pentaho/Xmla",
dataType: 'text',
type: "POST",
beforeSend: function(req) {
req.setRequestHeader('Authorization', "Basic " + btoa("anonymous:anonymous"));
}
}​
..but the result of this POST request is:
XMLHttpRequest cannot load http://192.168.15.54:8080/pentaho/Xmla. The request was redirected to​
'http://192.168.15.54:8080/pentaho/Login;jsessionid=BF6E2FE9143B4402BCEEAAD115C714FA', which is disallowed for cross-origin requests that require preflight.
Xmlaconnect for Excel send POST filled with Authorization header and his data:
Authorization: Basic YW5vbnltb3VzOmFub255bW91cw==\r\n
. But sample for kendo pivot with kendoPivotGrid send OPRION request: my sniffer not catches POST packet in this case. Inside OPTION packet I see this:
Access-Control-Request-Headers: accept, authorization, content-type​
It seems as authorization must be inside OPTION packet. But I am not see this header itself as ​for case of Xmlaconnect ...
What's the problem?
Hi,
H​opefully someone can give me some pointers on this one. I'm using UI with Angular, and ran into a problem trying to use the datetimepicker as a column filter. The issue seems to occur when the dataSource is updated via the dataSource.data() method. I've managed to reproduce this in the dojo http://dojo.telerik.com/ELado/3
Strangely if I use the k-rebind attribute and populate the data directly onto the options, the issue doesn't occur, however using k-rebind causes issues with column hiding and sorting - dojo example http://dojo.telerik.com/avOKi
Thanks
Jason
Hello ,
I have a requirement where in there are multiple shapes(parents) with multiple children. Is there a way to fit them into the diagram view without zooming​? ​For example wrap the shapes to fit the diagram view.
Thanks
I've a kendo progress bar defined with angularjs directive. I'm able to set the min, max and value. But I cannot find the way to set the progress status text.
The example provided is using a jQuery way:
passProgress.progressStatus.text("Empty");});
I cannot figure out how to do it. My code looks like this.
<div kendo-progress-bar="progressBar"
k-min="voterStatus.progressOption.min"
k-max="voterStatus.progressOption.max"
k-value="voterStatus.progressOption.progress" >
</div>