Telerik Forums
Kendo UI for jQuery Forum
1 answer
101 views
Hi,

I created an Icenium mobile app that utilizes Kendo UI and Parse.com. I have already developed a Facebook Login function for the app. Now i Need the following additional functions:

- post a message ("Event") with some additional fields and select a Location via Google Maps
- search for events at a specific Location or at the current Location, result should be Shown either as a list or in map
- when launching the app, it Show automatically all Events near the current Position in a map
- when selecting an Event, it should Show up in a Detail view

Is there anybody out there who could accomplish this? (paid of course)

Best Regards
Jörg
David Silveria
Top achievements
Rank 1
 answered on 13 Aug 2013
4 answers
339 views
I've extended a suggestion to my purposes from this post:
http://www.kendoui.com/forums/kendo-ui-web/grid/grid-header-filtering-row-that-contains-1-element-for-each-column-in-grid-with-the-same-width.aspx

I've gotten it to work very well with my grid implementation. The only problem I've run  into that I'm not sure how to solve so far is that when a column is dragged to the group header it aligns the headers with my filter row just fine, but if you then go to page 2, the headers are suddenly misaligned though the filter row stays in place. 

You can see what I mean in this jsfiddle. It seems the <th> element that's added to the header row to indent the rows and align the grid is being removed somehow

Any suggestions about how to correct this behavior would be greatly helpful.

Edit: Actually, paging doesn't seem to matter. Just whenever the grid repaints as it also happens when filtering after grouping or grouping a second column.
Stacy
Top achievements
Rank 2
 answered on 13 Aug 2013
6 answers
109 views
Hello!
I using Grid on page and want to do some editing of cells.
var grid = $("#daily-tasks-detail-grid").kendoGrid({
    dataSource: {
        transport: {
            read: {
                url: '/json/ords',
                dataType: 'json'
            }
        }
    },
    columns: [
              { title: "Worker"},
              { title: "Description" }
     ],
    rowTemplate: kendo.template($("#rowTemplate").html())
}).data('kendoGrid');
I generate row on this template:
<script id="rowTemplate" type="text/x-kendo-tmpl">
    <tr role="row">
        <td role="gridcell"></td>
        <td role="gridcell"></td>
    </tr>
    <tr role="row">
        <td role="gridcell"></td>
        <td role="gridcell"></td>
    </tr>
</script>
How can I make the data-bind?
For example: <td role="gridcell"><input type="text" data-bind="value: value.name" /></td>
Alexander Valchev
Telerik team
 answered on 13 Aug 2013
6 answers
338 views
my page has three tabs. each time when open one tab, it will download the kendo ui relative js file. i tracked the network request and find out there is an unique id added to the js resource so the browser will not cache the js file properly.
 the url goes like this:
/Scripts/kendo/2013.1.319/kendo.all.min.js?_=1367715372684 

URL Method Result Type Received Taken Initiator Wait‎‎ Start‎‎ Request‎‎ Response‎‎ Cache read‎‎ Gap‎‎
/Scripts/kendo/2013.1.319/kendo.all.min.js?_=1367715372684 GET 200 application/x-javascript 0.66 MB 1.35 s JS Library XMLHttpRequest 1513 0 109 1248 0 1155

Dose anyone konw how to remove the unique id?
Vladimir Iliev
Telerik team
 answered on 13 Aug 2013
1 answer
80 views
Working on a Single App-page designed for tablets/desktops so we want to have a mobile look and feel.
Right now i am looking at 3 kendo.mobile.Application instances.
-one for the main page(2 views: 'main_page' and 'details_page'), also we have 2 way drawer planned for it.
-one app for the right drawer(a filters list(main view) and a new view for each filter 'edit mode')
-one app for the left drawer(a hierarchical list)
Working on this, but i have doubts.
Let me know if this should work(theoretically).

Thanks

Petyo
Telerik team
 answered on 13 Aug 2013
5 answers
106 views
I have a page with 4 splitters. I only want to receive a layoutChange event for a particular splitter. When I resize the window the layoutChange callback is executed 6 times. Within my callback I need to calculate the height of a pane (the height is auto and cannot be pulled from the splitter reference as far as I know). Height calculation is an expensive operation and there is noticeable delay when this happens 6 times in a row. I would prefer to avoid creating a counter and relying on a condition such as if modulus 6 equals 0, calculate height.

I've created the following fiddle to demonstrate my issue: http://jsfiddle.net/kUvLZ/.

  1. Is there a better way to bind my callback that will reduce the number of callback executions?
  2. I don't exactly understand how/why the layoutChange is being triggered like this. Helping me understand it more would probably answer the following related questions
  3. I understand that the child splitter is probably listening to parent splitter resizes. But why 6 times? Why not 3 or 4?
  4. Is there a problem with the splitter control that's causing it to fire this many times? I would expect a parent splitter (.references-wrap in my example) to receive all of the layoutChange events from children. I don't expect a child to have to listen to all of the layoutChanges above it.
  5. Could an alternate bind event be created to make it so that layoutChange listens to all nested calls whereas something like paneLayoutChange would only be triggered once?
Help appreciated.
Ryan
Top achievements
Rank 1
 answered on 13 Aug 2013
1 answer
291 views
I am confused on how to send the save data to an outside controller. Im using kendo for html.   Here is my code for the scheduler. How could I send the data from a save to a controller. 
Thanks

$("#scheduler").kendoScheduler({
                date: new Date("2013/6/13"),
                startTime: new Date("2013/6/13 07:00 AM"),
                height: 600,
                views: [
                "day",
                    { type: "week", selected: true },
                    "month",
                    "agenda"
                ],
                timezone: "Etc/UTC",
                save: scheduler_save,
                remove: scheduler_remove,
                edit: scheduler_edit,
                cancel: scheduler_cancel,
                dataSource: {
                    batch: true,
                    transport: {
                        read: {
                            url: "/Team/Calendar/PopulateCalendar/",
                            dataType: "json",
                            
                        },
                        //update: {
                        //    url: "/Team/Calendar/UpdateAppointment/",
                        //    dataType: "json"
                        //},
                        //create: {
                        //    url: "/Team/Calendar/CreateAppointment/",
                        //    dataType: "json"
                        //},
                        //destroy: {
                        //    url: "http://demos.kendoui.com/service/tasks/destroy",
                        //    dataType: "jsonp"
                        //},
                        parameterMap: function (options, operation) {
                            if (operation !== "read" && options.models) {
                                return { models: kendo.stringify(options.models) };
                            }
                        }
                    },
                    schema: {
                        model: {
 
                            id: "taskId",
                            fields: {
                                taskId: { from: "TaskID", type: "number" },
                                title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                                start: { type: "date", from: "Start" },
                                end: { type: "date", from: "End" },
                                startTimezone: { from: "StartTimezone" },
                                endTimezone: { from: "EndTimezone" },
                                description: { from: "Description" },
                                recurrenceId: { from: "RecurrenceID" },
                                recurrenceRule: { from: "RecurrenceRule" },
                                recurrenceException: { from: "RecurrenceException" },
                                ownerId: { from: "OwnerID", defaultValue: 1 },
                                isAllDay: { type: "boolean", from: "IsAllDay" }
 
                            }
                        }
                         
                    },
                     
                    resources: [
                        {
                            field: "ownerId",
                            title: "Owner",
                            dataSource: [
                                { text: "Alex", value: 1, color: "#f8a398" },
                                { text: "Bob", value: 2, color: "#51a0ed" },
                                { text: "Charlie", value: 3, color: "#56ca85" }
                            ]
                        }
                    ]
                }
            })
        });
Atanas Korchev
Telerik team
 answered on 13 Aug 2013
2 answers
83 views
Hey guys I have some strings in my grid like "Machine2". When I try to sort by Starts with: "Machine2" everything works great. But when I use equals:   "Machine2" I get nothing. Do you know what causes this problem or maybe if I can just leave Starts with sorting ability (which is sufficient).  Also it only occurs when using strings cause when I have int numbers like 100 sorting with equals: "100" works just fine.
Mateusz
Top achievements
Rank 1
 answered on 13 Aug 2013
8 answers
101 views
Are the any plans to add a "Help" action to the window?

This is something we are using with all our application, not just for windows, but for panels too.

See example of what Ext JS has: http://docs.sencha.com/extjs/4.1.3/#!/api/Ext.panel.Tool-cfg-type

regards.
Dimiter Madjarov
Telerik team
 answered on 13 Aug 2013
3 answers
105 views
Hi,

I've just downloaded the new version (2013.2 716) of Kendo UI (also the same problem in 2013.1.514). I created a webservice which returns the desired json for a server groupable grid datasource. The result of the webservice:

{
    "d": {
        "Data": null,
        "Groups": [
            {
                "aggregates": [],
                "field": "Comment",
                "value": "abc",
                "hasSubgroups": false,
                "items": [
                    { "Id": 2, "Comment": "abc" },
                    { "Id": 6, "Comment": "abc" }
                ]
            },
            {
                "aggregates": [],
                "field": "Comment",
                "value": null,
                "hasSubgroups": false,
                "items": [
                    { "Id": 110, "Comment": null }
                ]
            }
        ],
        "Total": 3
    }
}
The setup of the grid and the viewmodel:
<!DOCTYPE html>
<html>
<head>
    <title></title>
 
</head>
<body>
    <script>
        var viewModel = kendo.observable({
            dataSource: new kendo.data.DataSource({
                transport: {
                    read: {
                        url: "MyService.asmx/GetData",
                        dataType: "json",
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    },
                    parameterMap: function (data, type)
                    {
                        return kendo.stringify({
                            take: data.take,
                            skip: data.skip,
                            sort: data.sort || [],
                            group: data.group || [],
                            filter: data.filter || null
                        });
                    }
                },
                schema: {
                    data: "d.Data",
                    total: "d.Total",
                    groups: "d.Groups",
                    model: {
                        fields: {
                            Id: { type: 'number' },
                            Comment: { type: 'string' }
                        }
                    }
                },
                pageSize: 100,
                serverPaging: true,
                serverFiltering: true,
                serverSorting: true,
                serverGrouping: true
            }),
            onItemSelected: function (e)
            {
                alert('checkbox clicked');
            }
        });
 
        $(document).ready(function ()
        {
            kendo.bind(document.body, viewModel);
        });
    </script>
 
    <div data-bind="source: dataSource" data-role="grid" data-groupable="true" data-pageable="false" data-columns="[{ template: '<input type=\'checkbox\' data-bind=\'events: {click:onItemSelected}\'/>'},{ title:'ID', field: 'Id' },{ title: 'Comment', field: 'Comment' }]">
    </div>
</body>
</html>
When I try to use the grouping feature i got a javascript error:

Uncaught TypeError: Object [object Object] has no method 'get'

I debugged it and I found that the problem is caused by the binding of the checkbox click event (if I remove the checkbox column everything works fine).
There is a function in kendo.binder.js:
01.function flattenGroups(data) {
02.    var idx, length, result = [];
03. 
04.    for (idx = 0, length = data.length; idx < length; idx++) {
05.        if (data[idx].hasSubgroups) {
06.            result = result.concat(flattenGroups(data[idx].items));
07.        } else {
08.            result = result.concat(data[idx].items);
09.        }
10.    }
11.    return result;
12.}
I think the code in line number 8 is not working well, if the data[idx].items is an ObservableArray (the concat adds the observable array as a single element to the result array). I found another implementation of flattenGroups in kendo.data.js:
01.function flattenGroups(data) {
02.    var idx, length, result = [];
03. 
04.    for (idx = 0, length = data.length; idx < length; idx++) {
05.        if (data[idx].hasSubgroups) {
06.            result = result.concat(flattenGroups(data[idx].items));
07.        } else {
08.            result = result.concat(data[idx].items.slice());
09.        }
10.    }
11.    return result;
12.}
By changing the flattenGroups in kendo.binder.js to the version of kendo.data.js, the problem resolved.

Is it a bug (the missing "slice()" from kendo.binder.js flattenGroups function), or am I missing something from my code?
Vladimir Iliev
Telerik team
 answered on 13 Aug 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?