Telerik Forums
Kendo UI for jQuery Forum
1 answer
70 views
Since I have upgraded to the latest kendoui package this morning (2013.2.716),

one of my grids stopped binding.

The view is as follows in asp.net mvc:

@(Html.Kendo().Grid<IPMC.Web.InventoryQueryService.ProductStatistic>()
    .Name("ProductStatisticsGrid")
    .Columns(columns =>
    {
        columns.Bound(o => o.ClientProductReference).Title("Product Ref").Width(50);
        columns.Bound(o => o.ProductDescription).Title("Description").Width(50);
        
        columns.Bound(o => o.CompletedCasesCount).Title("CCC").Width(50);
        columns.Bound(o => o.CompletedCasesTodayCount).Title("CCC Today").Width(50);
        columns.Bound(o => o.CompletedCasesYesterdayCount).Title("CCC Yesterday").Width(50);
        columns.Bound(o => o.CompletedCases1WeekCount).Title("CCC Week").Width(50);
        columns.Bound(o => o.CompletedCases1MonthCount).Title("CCC Month").Width(50);
        columns.Bound(o => o.PercentageOfAllCompletedCases).Title("CCC").Format("{0:P2}").Width(50);

        columns.Bound(o => o.LanesAssignedToProductCount).Title("Lane Count").Width(50);
        columns.Bound(o => o.CasesStoredInLanesCount).Title("Lanes Cases").Width(50);
        columns.Bound(o => o.YoungestCaseEnteredInventoryTimeStampLocal).Title("Youngest Case Date").Format("{0:yyyy-MM-dd}").Width(90);
        columns.Bound(o => o.OldestCaseEnteredInventoryTimeStampLocal).Title("Oldest Case Date").Format("{0:yyyy-MM-dd}").Width(90);

        columns.Bound(o => o.CasesOnSequenceConveyorsFromInfeedCount).Title("SC In").Width(50);
        columns.Bound(o => o.CasesOnSequenceConveyorsToOutfeedCount).Title("SC Out").Width(50);

        columns.Bound(o => o.CasesSchedueledInReplenishmentsCount).Title("Replen Cases").Width(50);
        columns.Bound(o => o.CasesSchedueledToCompleteAccordingToCaseSequenceCount).Title("Case Seq todo").Width(50);
    })
    .Groupable(t => t.Enabled(false))
    .Filterable()
    .Sortable()
    .Pageable(p => p.Refresh(true))
    .DataSource(db => db.Ajax().Read("_GetProductStatistics", "Inventory").ServerOperation(false).PageSize(100).Sort(s => s.Add("ClientProductReference")))
)


And the data received by the grid in the ajax call is :
{"Data":[{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930460)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090874477)\/","ProductId":"product-702553","ProductDescription":"4X6 CANETTE 355ml Corona","ClientProductReference":"702553","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":1,"CasesOnSequenceConveyorsFromInfeedCount":2,"CasesStoredInLanesCount":44,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930460)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090874477)\/","CasesSchedueledInReplenishmentsCount":53,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":1},{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930655)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090875952)\/","ProductId":"product-701267","ProductDescription":"3X8 CAN Dry Cold Shot","ClientProductReference":"701267","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":2,"CasesOnSequenceConveyorsFromInfeedCount":2,"CasesStoredInLanesCount":43,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930655)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090875952)\/","CasesSchedueledInReplenishmentsCount":53,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":2},{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930806)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090877131)\/","ProductId":"product-702707","ProductDescription":"1.18 L DRY 7.5","ClientProductReference":"702707","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":1,"CasesOnSequenceConveyorsFromInfeedCount":2,"CasesStoredInLanesCount":43,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930806)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090877131)\/","CasesSchedueledInReplenishmentsCount":54,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":1},{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930935)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090878032)\/","ProductId":"product-700231","ProductDescription":"1.18 L Molson Dry","ClientProductReference":"700231","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":1,"CasesOnSequenceConveyorsFromInfeedCount":2,"CasesStoredInLanesCount":42,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930935)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090878032)\/","CasesSchedueledInReplenishmentsCount":55,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":1},{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930873)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090879324)\/","ProductId":"product-703235","ProductDescription":"1.18 L Big 10.1","ClientProductReference":"703235","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":1,"CasesOnSequenceConveyorsFromInfeedCount":2,"CasesStoredInLanesCount":41,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930873)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090879324)\/","CasesSchedueledInReplenishmentsCount":56,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":1},{"YoungestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090930694)\/","OldestCaseEnteredInventoryTimeStampLocal":"\/Date(1374090881743)\/","ProductId":"product-704167","ProductDescription":"GROSSE CAN 710 ML Export","ClientProductReference":"704167","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":2,"CasesOnSequenceConveyorsFromInfeedCount":3,"CasesStoredInLanesCount":39,"LanesAssignedToProductCount":3,"YoungestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090930694)\/","OldestCaseEnteredInventoryTimeStampUTC":"\/Date(1374090881743)\/","CasesSchedueledInReplenishmentsCount":56,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":2},{"YoungestCaseEnteredInventoryTimeStampLocal":null,"OldestCaseEnteredInventoryTimeStampLocal":null,"ProductId":"product-700388","ProductDescription":"Grosse 650 ML Heineken","ClientProductReference":"700388","CompletedCasesCount":0,"CompletedCasesTodayCount":0,"CompletedCasesYesterdayCount":0,"CompletedCases1WeekCount":0,"CompletedCases1MonthCount":0,"PercentageOfAllCompletedCases":NaN,"CasesOnSequenceConveyorsToOutfeedCount":0,"CasesOnSequenceConveyorsFromInfeedCount":0,"CasesStoredInLanesCount":0,"LanesAssignedToProductCount":0,"YoungestCaseEnteredInventoryTimeStampUTC":null,"OldestCaseEnteredInventoryTimeStampUTC":null,"CasesSchedueledInReplenishmentsCount":100,"CasesSchedueledToCompleteAccordingToCaseSequenceCount":1}],"Total":7,"AggregateResults":null,"Errors":null}


Any thoughts ???
Vladimir Iliev
Telerik team
 answered on 19 Jul 2013
5 answers
165 views
I have a grid that is configured for a Model, and records are edited/added by a popup editor that displays a custom template that contains cascading comboboxes.  
It works beautifully for adding a new record.
However, when editing an existing record,  the main combobox is loaded but the cascade combobox is not.
It happens because the script that gets the parameters for the Action gets the value from the main combobox (that hasn't been loaded) 

How to solve it?
Petur Subev
Telerik team
 answered on 19 Jul 2013
1 answer
320 views
I'm having trouble using data-attribute initialization for the grid.

I created a jsbin using the KendoUI web sample code, with "dataSource", "columns", and "pageable" moved to global var's.
http://jsbin.com/uwicus/1/

As you can see in the jsbin, the grid works correctly when initialized by

<script>
    $(document).ready(function() {
        $("#grid").kendoGrid({
            dataSource: ds,
            height: 430,
            scrollable: true,
            sortable: true,
            filterable: true,
            pageable: pageableProperties,
            columns: columnList
        });
    });
</script>
However, when I switch to the equivalent data-attribute initialization, it no longer works correctly
<div
    id="grid"
    data-role="grid"
    data-source="ds"
    data-height="430"
    data-scrollable="true"
    data-sortable="true"
    data-filterable="true"
    data-pageable="pageableProperties"
    data-columns="columnList"
/>

Please let me know what I'm missing here.  Thx.
Alexander Valchev
Telerik team
 answered on 19 Jul 2013
2 answers
78 views
How can I update my project to use Kendo UI Q2 2013 and use the Drawer widget?.

I have updated the files: kendo.mobile.min.js and kendo.mobile.all.min.css downloaded from the trial version (Kendo UI Beta v2013.2.716) but I can't make Drawer to work in the simulator.
Steve
Telerik team
 answered on 19 Jul 2013
3 answers
289 views
Would it be possible to create a hierarchical datasource not from two endpoints, as the example shows below, but from two functions returning json.  Could the two transport sections below be replaced with data (as in data: getProductData()) functions which return data that the dataSource then "combines" the way it  does with remote endpoints?  If this is possible, how would the function returning the second level data (like products below) look?

var Categories = new kendo.data.HierarchicalDataSource({
    transport: {
        read: {
            url: "http://demos.kendoui.com/service/Categories"
        }
    },
    schema: {
        model: {
            hasChildren: "Products",
            id: "CategoryID",
            children: {
                transport: {
                    read: {
                        url: "http://demos.kendoui.com/service/Products"
                    }
                },
                schema: {
                    model: {
                        id: "ProductID",
                        hasChildren: false
                    }
                }
            }
        }
    }
});
Butter
Top achievements
Rank 1
 answered on 19 Jul 2013
0 answers
126 views
The following source code comments slipped accidentally in the Q2'13 release of Kendo UI:

* Kendo UI Beta v2013.2.716 (http://kendoui.com)
* Copyright 2013 Telerik AD. All rights reserved
* Kendo UI Beta license terms available at
* http://www.kendoui.com/purchase/license-agreement/kendo-ui-beta.aspx


and we apologize for the inconvenience this might cause you. We identified this issue a bit late during the release process and decided not to postpone the publishing and announcement because of them. You can simply disregard/ignore or delete from the source the bolded parts in the comments.

Kind regards,
Kendo UI Team

Kendo UI
Top achievements
Rank 1
 asked on 19 Jul 2013
2 answers
255 views
Hi,

I have an array of folder names and I'm trying to figure out how to walk the treeview to select the nested folder. How can I do that? I do not have ID set in the model of the Hierarchical Datasource - I'm just trying to do it by the text of the nodes. The tricky part is that some nodes can have the same name, like "ppt > _rels > slideMaster > _rels"
Alex Gyoshev
Telerik team
 answered on 19 Jul 2013
1 answer
185 views

Hi,

I'm trying to build a kendo window which includes both grid and multiselect controls, 
and to allow by double clicking on a row in the grid to add the clicked item to the multi select (Lets say that "id is the value and "name" is the text).
After clicking on the item in the grid I'm trying to append this new value  to the multi select using its api (using the "value" function).
Afterwards,  I remove some of the values I've just added using the control itself (clicking on the "X" of the item) and adding the same items again.
The initial dataSource of the multi select control is an empty array, while it's being changed when new values are added.
I check if the new value I just got from the grid is already exists in the datasource and in the value array, otherwise I add it first to the datasource and then to the value array.

When I made all the mentioned above, I found out that adding an item which had been removed before will hide/remove all the other items and the control would only display the last item added, while the value array still contains all the other ones.
On the "change" event that is triggered by deleting this item, I watch at the value array and see that it's not been changed (this value is still there).
Performing these steps over and over, the value list apears to have duplicates at the same amount as the selected items from the grid (distinct values).

Thanks
Petur Subev
Telerik team
 answered on 19 Jul 2013
2 answers
77 views
http://jsbin.com/elutuz/4/

If I set the second tab (Sales) to have a data-stretch="true" attribute.  The drawer is not functional on this view. I had my code in a PhoneGap app and noticed a console error related to kendo.currentView.scroller.disable.

Hope that helps.
Kiril Nikolov
Telerik team
 answered on 19 Jul 2013
1 answer
160 views
Hello Support,

We're using DataSource in a stand-alone manner, simply using it as a gateway to and from Web API endpoints.  It's been great for reads.  But now we've come to editing and creating, and we're not having any luck.

Consider the projectsDataService below.  The projectsDataService provides a gateway to an enumerable of Project, which has all of the familiar fields you would expect of a Project class:
01.define('projectsDataService', ['underscore'],
02.    function(_) {
03.        var projectsDataSource = new kendo.data.DataSource({
04.                transport: {
05.                    read: {
06.                        url: "api/projects",
07.                        dataType: "json"
08.                    },
09.                    update: {
10.                        url: "api/projects",
11.                        dataType: "json",
12.                        type: 'PUT'
13.                    }
14.                },
15.                page: 1,
16.                pageSize: 20,
17.                schema: {
18.                    model: {
19.                        location: function() {
20.                            return this.projectAddress.city + ", " + this.projectAddress.state.abbr;
21.                        },
22.                        encodedProjectAddress: function () {
23.                            //implement Strategy pattern for encoding
24.                            var fullAddress = this.projectAddress.streetAddress + ",+" +
25.                                this.projectAddress.city + ",+" +
26.                                this.projectAddress.state.abbr;
27. 
28.                            return fullAddress.replace(/ /g, "+");
29.                        },
30.                        multilineProjectAddress: function() {
31.                            var address = [this.projectAddress.streetAddress,
32.                                '<br/>',
33.                                this.location() + '  ' + this.projectAddress.postalCode].join('\n');
34. 
35.                            return address;
36.                        },
37.                        created: function() {
38.                            return moment(new Date(this.createdAt)).fromNow();
39.                        }
40.                    }
41.                }
42.            }),
43. 
44.            getProjects = function (projectsObservableArray) {
45.                projectsDataSource.fetch(function() {
46.                    var dataView = projectsDataSource.view();
47.                    var projects = [];
48.                    _.each(dataView, function (item) {
49.                        
50.                        projects.push(ko.observable(item));
51.                    });
52.                    projectsObservableArray(projects);
53.                });
54.            },
55.             
56.            saveProjects = function() {
57.                projectsDataSource.sync();
58.            };
59. 
60.        return {
61.            getProjects: getProjects,
62.            saveProjects: saveProjects
63.        };
64.    }
65.);
All of the computed-s on the model are available to Knockout, as expected.  Nothing wrong there.  But I have a couple of questions:
  1.   ProjectAddress is a nested complex type, so that I have projectAddress.streetAddress, projectAddress.city, projectAddress.state, etc.  Changes in these properties are, in fact, manifested in the UI (courtesy of Knockout), but changing them doesn't trigger a call to the transport.  In other words, the changes never make it to the server.  I get the sense that DataSource is expecting flattened data.  If so, how do I go about doing that the "DataSource" way?
  2.  Is the fields property necessary on the model, and what is the difference between binding to a field on the model, and binding to a field in the fields property?
  3.   Consider the getProjects() function.  I'm stuffing a knockout array with an array of oversables--the projects.  Should I be making each of Project's properties observable as well in order for the DataSource to pick up on the change?  The problem is that I'm seeing changes in the client, even across multiple screens, ut no call to the server.
  4. Is the "id" property, or field, necessary on the model?
  5. Is it necessary to mapevery property ("field") on the model, or just those that are interesting, as in the code above?
Thank you.

Eric
Alexander Valchev
Telerik team
 answered on 19 Jul 2013
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
MultiColumnComboBox
Chat
DateRangePicker
Dialog
Checkbox
Timeline
Drawer
DateInput
ProgressBar
MediaPlayer
ImageEditor
TextBox
OrgChart
Effects
Accessibility
PivotGridV2
ScrollView
BulletChart
Licensing
QRCode
ResponsivePanel
Switch
Wizard
CheckBoxGroup
TextArea
Barcode
Breadcrumb
Collapsible
Localization
MultiViewCalendar
Touch
RadioButton
Stepper
Card
ExpansionPanel
Rating
RadioGroup
Badge
Captcha
Heatmap
AppBar
Loader
Security
TaskBoard
Popover
DockManager
FloatingActionButton
CircularGauge
ColorGradient
ColorPalette
DropDownButton
TimeDurationPicker
ToggleButton
TimePicker
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
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Iron
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?