Telerik Forums
Kendo UI for jQuery Forum
11 answers
1.0K+ views
I'm getting error: Microsoft JScript runtime error: Object doesn't support property or method 'kendoGrid'

Grid:
@(Html.Kendo().Grid(Model)
        .Name("CodeManager")   
    .Columns(columns =>
    {       
        columns.Bound(p => p.CodeID);
        columns.Bound(p => p.Status);       
    })   
    .DataSource(dataSource => dataSource   
        .Ajax()        
        .Read(read => read.Action("_Filtering", "CodeManager"))
    ))
Daniel Mitchell
Top achievements
Rank 1
 answered on 31 Mar 2014
1 answer
180 views
Hi, I'm setting up a kendoDropTargetArea on a grid like this:

    _setupDropTargets: function() {
      var _this = this;
      this.grid.tbody.kendoDropTargetArea({
        group: 'allocationDetailsGroup',
        filter: this.dropSelector,
        drop: function(e) {
          if (_this._canDrop(e)) {
            return _this._doDrop(e);
          } else  {cancel dragging here}
        }
      });
      return this;
    }

What do I put in "cancel dragging here", so that the draggable floats back to its original position? (right now it disappears).

Tom
 

Alexander Valchev
Telerik team
 answered on 28 Mar 2014
2 answers
571 views
Is it possible to add a grid inside a ClientTemplate for a column?   I would like to have a grid and then for one of the columns in the rows add another grid to it using the datasource.

It is like the example posted: http://demos.telerik.com/kendo-ui/web/grid/rowtemplate.html.  But, I want a grid in the column not the detailed grid example. 


Vladimir Iliev
Telerik team
 answered on 28 Mar 2014
3 answers
76 views
I am using the custom download kendo tool to download a single build of kendo for my projects needs. I will run this on tablets so I want the minimal amount of JavaScript. I'm using Sparklines DataViz and noticed that I have to also download DataViz themes to get them to show in IE 10. I wasn't expecting this because the tool appeared to manage dependencies for me. That is, if I select an item and it depends on other items, kendo automatically selects those other items for me.

Image attached.
T. Tsonev
Telerik team
 answered on 28 Mar 2014
6 answers
433 views
Hi,

This should be a minimal test case for TreeView reading its data from json file. Currently, we are testing it localy, using Internet Information server.
This is how we invoke the page:

http://localhost/cbp/index.html#/bb

In Chrome, F5 does not reload TreeView, Ctrl+F5 does. In Internet Explorer, reload displays TreeView for a fraction of a second and then its erased.

What problems do you see in this source and how should it be resolved?

Thanks,
Ivan
Ivan
Top achievements
Rank 1
 answered on 28 Mar 2014
1 answer
365 views
Hi,
We have angularjs - kendo ui based solution. In the template kendo tree is defined with k-options param set to angular controller variable.
Please see attached :
1. bulletinBoard.tpl.html - template where kendo tree is defined
2. bulletinBoard.js - controller

Inside controller we have defined factory for communication with web api in order to retrieve asynchronously json response.

In the LogConsole.png, I have pasted just for the reference that valid json is returned and unwrapped in the controller by calling .then(function(data)... call.

However tree is not populated with the fetched data.
Please advice what are we doing wrong?

We are new to Angular, Kendo and spent many hours trying to resolve this issue.

Thanks in advance,
Sincerely
Ivan


Ivan
Top achievements
Rank 1
 answered on 28 Mar 2014
1 answer
91 views
Hello,

When I remove an item from an array using splice, as per your examples, it appears that two items are being removed from the array rather than just one.
I've created an example below:

http://trykendoui.telerik.com/iBec

It seems to be caused by using the 'set' command against the array:

viewModel.set('data.files', fileCollection);

Am I using the set command in the wrong way?

Thanks.
Petyo
Telerik team
 answered on 28 Mar 2014
6 answers
304 views

Environment:
VS2010 - MVC4 Web Project
Server 2008 R2
IE 8 / FF 10
Telerik UI for ASP.NET MVC 2014.1 318
jQuery 1.9.0

I am not able to get a reference using the element.data("kendoGrid") syntax.  Every time I hit that code, my variable is undefined.

Can someone please point me to what I'm missing?

Html:

01.<div class="col-md-2">
02.    <div class="panel panel-default">
03.        <div class="panel-heading">Line of Business</div>
04.        <div class="panel-body" id="lobnav"></div>
05.    </div>
06.    <div class="panel panel-default">
07.        <div class="panel-heading">Application</div>
08.        <div class="panel-body" id="lobapp"></div>
09.    </div>
10.    <div class="panel panel-default">
11.        <div class="panel-heading">Filter</div>
12.        <div class="panel-body" id="jobfilter"></div>
13.    </div>
14.</div>
15.<div class="col-md-10">
16.    <div id="jobsgrid"></div>
17.</div>

Code:
​
001.$(document).ready(function () {
002.    function resizeGrid() {
003.        var gridElement = $("#jobsgrid"),
004.            dataArea = gridElement.find(".k-grid-content"),
005.            gridHeight = gridElement.innerHeight(),
006.            otherElements = gridElement.children().not(".k-grid-content"),
007.            otherElementsHeight = 0;
008.        otherElements.each(function () {
009.            otherElementsHeight += $(this).outerHeight();
010.        });
011.        dataArea.height(gridHeight - otherElementsHeight);
012.    };
013. 
014.    function loadApplications(arg) {
015.        $("#lobapp").kendoListView({
016.            selectable: "single",
017.            change: function (e) {
018.                loadJobs(arg, false);
019.            },
020.            template: "<div>${Name}</div>",
021.            dataSource: {
022.                transport: {
023.                    read: {
024.                        url: "/api/App"
025.                    },
026.                    parameterMap: function (options, type) {
027.                        return { 'id': arg };
028.                    }
029.                }
030.            }
031.        });
032.    };
033. 
034.    function filterJobs(arg) {
035.        var jgrid = $("#jobsgrid").data("kendoGrid");
036.        if (arg !== 1) {
037.            jgrid.dataSource.filter({
038.                field: "Status", operator: "eq", value: arg
039.            });
040.        } else {
041.            jgrid.dataSource.filter({});
042.        }
043.    };
044.     
045.    $(window).resize(function () {
046.        resizeGrid();
047.    });
048. 
049.    $("#jobfilter").kendoListView({
050.        selectable: "single",
051.        template: "<div id='filter-${Id}'>${Name}</div>",
052.        dataSource: {
053.            transport: {
054.                read: {
055.                    url: "/api/Theme"
056.                }
057.            }
058.        },
059.        change: function(e) {
060.            var itm = this.select().index(), dataItm = this.dataSource.view()[itm];
061.            filterJobs(dataItm.id);
062.        }
063.    });
064. 
065.    $("#lobnav").kendoTreeView({
066.        select: function (e) {
067.            var tree = this, src = tree.dataItem(e.node);
068.            loadApplications(src.id);
069.            if (src.hasChildren) {
070.                loadJobs(src.id, true);
071.            } else {
072.                loadJobs(src.id, false);
073.            }
074.        },
075.        dataSource: {
076.            transport: {
077.                read: {
078.                    url: "/api/Lob"
079.                }
080.            },
081.            schema: {
082.                model: {
083.                    id: "Id",
084.                    hasChildren: "HasChildren"
085.                }
086.            }
087.        },
088.        loadOnDemand: false,
089.        dataTextField: "Name"
090.    });
091. 
092.    function loadJobs(arg, parent) {
093.        $("#jobsgrid").kendoGrid({
094.            columns: [
095.                {
096.                    field: "owner",
097.                    title: "Application",
098.                    width: "5%"
099.                },
100.                {
101.                    field: "name",
102.                    title: "Process Name",
103.                    width: "18%"
104.                },
105.                {
106.                    field: "prcnt",
107.                    title: "Percent Complete",
108.                    template: "<div class='progress'></div>",
109.                    width: "30%"
110.                },
111.                {
112.                    field: "avgtime",
113.                    title: "Average Time",
114.                    format: "{0:hh:mm:ss}",
115.                    width: "12%"
116.                },
117.                {
118.                    field: "elapsed",
119.                    title: "Elapsed Time",
120.                    format: "{0:hh:mm:ss}",
121.                    width: "12%"
122.                },
123.                {
124.                    field: "dproc",
125.                    title: "Dependent Process",
126.                    width: "5%"
127.                },
128.                {
129.                    field: "status",
130.                    title: "Status"
131.                }
132.            ],
133.            sortable: {
134.                mode: "single",
135.                allowUnsort: true
136.            },
137.            pageable: true,
138.            scrollable: false,
139.            resizable: true,
140.            dataSource: {
141.                transport: {
142.                    read: {
143.                        url: "/api/Process?id=" + arg + "&parent=" + parent
144.                    }
145.                },
146.                schema: {
147.                    data: "Data",
148.                    total: "Count",
149.                    model: { id: "Id" }
150.                },
151.                pageSize: 15,
152.                serverPaging: true,
153.                serverFiltering: true
154.            },
155.            dataBound: function (e) {
156.                var grid = this;
157.                $(".progress").each(function () {
158.                    var row = $(this).closest("tr");
159.                    var model = grid.dataItem(row);
160.                    if (model.prcnt <= 100) {
161.                        $(this).kendoProgressBar({
162.                            value: model.prcnt,
163.                            type: "percent"
164.                        });
165.                    } else {
166.                        $(this).kendoProgressBar({
167.                            value: model.prcnt,
168.                            type: "percent"
169.                        }).html("<span class='k-progress-status-wrap'>" +
170.                            "<span class='k-progress-status'>Overtime</span></span>" +
171.                            "<div class='k-state-selected k-complete' style='width: 100%;'>" +
172.                            "<span class='k-progress-status-wrap overtime' style='width: 100%;'>" +
173.                            "<span class='k-progress-status overtime'>Overtime</span></span></div>");
174.                    }
175.                });
176.            }
177.        });
178.    };
179.});

Alexander Valchev
Telerik team
 answered on 28 Mar 2014
4 answers
561 views
Hello everyone!

I'm new with Phonegap and Kendo!
I look for a solution for several hours and nerver found it, so I need your  precious help!

I  have a listview-link and when I click on an item, I call a function who use "app.navigate" to redirect to an another page, but I want to know if is it possible to send datas to this another page? and how to do that?

Maybe I should use an another solution than app.navigate? 

thank you in advance.





Kiril Nikolov
Telerik team
 answered on 28 Mar 2014
13 answers
627 views

I have a grid I'd like to populate that uses a viewmodel that has a datasource with a REST url that has parameters for filtering the data.  I'm trying to set the url parameters, but I'm unable to get at them from the nested datasource.

How can I make the nestd url dynamically reflect the changes in the parent observable?  My viewmodel is below, and any help is appreciated!

Thanks, Dennis

var viewModel = kendo.observable({
    artistFilter: "",
    titleFilter: "",
    genderFilter: "",
    artistFilterUrl: function () {
        if (this.get("artistFilter") == "") {
            return "";
        }
        return "&artist=" + this.get("artistFilter");
    },
    titleFilterUrl: function () {
        if (this.get("titleFilter") == "") {
            return "";
        }
        return "&title=" + this.get("titleFilter");
    },
    Url: function () {
        return this.get("baseUrl") + this.artistFilterUrl() + this.titleFilterUrl();
    },
    gridSource: new kendo.data.DataSource({
        transport: {
            read: {
                url: function () { return viewModel.Url() }, // this is where I'm having trouble
                dataType: "jsonp",
                async: false
            }
        },
        schema: {
            data: "songs",
            total: "count",
            model: {
                fields: {
                    Artist: { type: "string" },
                    Title: { type: "string" },
                    Category: { type: "string" },
                    Gender: { type: "string" },
                    CatalogNumber: { type: "string" }
                }
            }
        },
        page: 1,
        pageSize: 50,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true
    })
});
Kevin
Top achievements
Rank 1
 answered on 28 Mar 2014
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?