Telerik Forums
Kendo UI for jQuery Forum
2 answers
95 views

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

Enrico
Top achievements
Rank 1
 answered on 29 Sep 2015
4 answers
2.1K+ views

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?

Nick
Top achievements
Rank 1
 answered on 29 Sep 2015
5 answers
884 views

I am setting up my AutoComplete via MVC Wrappers. On a certain event, I want to be able to change the placeholder text for this autocomplete. However, 
I am not sure where and how to set this. I've tried the following but doesn't work.
>> $('lsel_l3').data('kendoAutoComplete').options.placeholder = 'new value';

the value always shows up as "undefined" in the debugger with IE 9

The snippet below shows the setup.. Thanks in advance.

 @(Html.Kendo().AutoComplete()
                    .Name("lsel_l3")
                    .DataTextField("Name")
                    .Filter("contains")
                    .Placeholder("District")
                    .MinLength(3)
                    .HtmlAttributes(new { style = "width:250px" })
                    .DataSource(source => {
                        source.Read(read =>
                        {
                            read.Action("LocationAutoComplete", "DcmSelectors", new { area = "" })
                                                .Data(@<text>function(e) {return lsel.GetL3AutoCompleteParams(e,lsel);}</text>);
                        })
                        .ServerFiltering(true);
                    })
                        .Events(events => events.Select(@<text>function(e) {return lsel.OnL3AutoCompleteSelect(e,lsel);}</text>)
                                                                       .Change(@<text>function(e) {return lsel.OnL3AutoCompleteChange(e,lsel);}</text>))
                    )
Ehtesham
Top achievements
Rank 1
 answered on 29 Sep 2015
1 answer
481 views

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.

Georgi Krustev
Telerik team
 answered on 29 Sep 2015
4 answers
236 views

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');
                                }
                            }
                        }
                    });

Enrico
Top achievements
Rank 1
 answered on 29 Sep 2015
3 answers
244 views

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.

  1. I have a dropdown on the page that based on the selected value in that list, the grid should be updated for the information retrieved from the server for the selection.  I have tried to make my dataSource: data be an object in my model but do not get any results for that.  I have been able to use the following code to get my initial results but nothing when the selection changes.

       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?

Boyan Dimitrov
Telerik team
 answered on 29 Sep 2015
2 answers
282 views

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?

 

 

 

Тарас
Top achievements
Rank 1
 answered on 29 Sep 2015
5 answers
124 views

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

Nikolay Rusev
Telerik team
 answered on 29 Sep 2015
1 answer
129 views

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

 

Daniel
Telerik team
 answered on 29 Sep 2015
1 answer
307 views

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>

Dimiter Madjarov
Telerik team
 answered on 28 Sep 2015
Narrow your results
Selected tags
Tags
Grid
General Discussions
Charts
Data Source
Scheduler
DropDownList
TreeView
MVVM
Editor
Window
DatePicker
Spreadsheet
Upload
ListView (Mobile)
ComboBox
TabStrip
MultiSelect
AutoComplete
ListView
Menu
Templates
Gantt
Validation
TreeList
Diagram
NumericTextBox
Splitter
PanelBar
Application
Map
Drag and Drop
ToolTip
Calendar
PivotGrid
ScrollView (Mobile)
Toolbar
TabStrip (Mobile)
Slider
Button (Mobile)
Filter
SPA
Drawing API
Drawer (Mobile)
Globalization
LinearGauge
Sortable
ModalView
Hierarchical Data Source
Button
FileManager
MaskedTextBox
View
Form
NavBar
Notification
Switch (Mobile)
SplitView
ListBox
DropDownTree
PDFViewer
Sparkline
ActionSheet
TileLayout
PopOver (Mobile)
TreeMap
ButtonGroup
ColorPicker
Pager
Styling
Chat
MultiColumnComboBox
Dialog
DateRangePicker
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Accessibility
Effects
PivotGridV2
Licensing
ScrollView
Switch
TextArea
BulletChart
QRCode
ResponsivePanel
Wizard
CheckBoxGroup
Localization
Barcode
Breadcrumb
Collapsible
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
TimePicker
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
BottomNavigation
Ripple
SkeletonContainer
Avatar
Circular ProgressBar
FlatColorPicker
SplitButton
Signature
Chip
ChipList
VS Code Extension
AIPrompt
PropertyGrid
Sankey
Chart Wizard
OTP Input
SpeechToTextButton
InlineAIPrompt
StockChart
ContextMenu
DateTimePicker
RadialGauge
ArcGauge
AICodingAssistant
SmartPasteButton
PromptBox
SegmentedControl
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?