Telerik Forums
Kendo UI for jQuery Forum
3 answers
452 views
If I use the data from the web service, edit and save.. Everything works great. If I use the code below I get the following error:
Uncaught TypeError: Object #<Object> has no method 'call'
Full Error:
Uncaught 
TypeError: Object #<Object> has no method 'call'    kendo.all.js:5521
(anonymous function)   kendo.all.js:5521
jQuery.extend.Deferred   jquery-1.8.2.js:1182
Observable.extend._promise   kendo.all.js:5520
Observable.extend._send   kendo.all.js:5548
Observable.extend.sync   kendo.all.js:5384
Widget.extend.saveRow   kendo.all.js:16577
(anonymous function)   kendo.all.js:16399
jQuery.event.dispatch  jquery-1.8.2.js:3063
jQuery.event.add.elemData.handle.eventHandle   jquery-1.8.2.js:2681

following code:

    <script src="Scripts/KendoUI/jquery-1.8.2.js"></script>
    <script src="Scripts/KendoUI/kendo.all.js"></script>

$(document).ready(createkendo = function () {

var myData = [{"Id":1,"StudyName":"StudyName123","Subjid":"1","MatchId":"1","MatchSources":"1","ArgusCaseNum":"1","Field":"1","ArgusValue":"1","EdcValue":"1","ValuesMatch":"Y","Status":"1","DmComments":"comments, comments","PvComments":"333","DateCreated":"2013-09-26T06:57:07"},{"Id":2,"StudyName":"StudyName555","Subjid":"test","MatchId":"test","MatchSources":"test","ArgusCaseNum":"test","Field":"test","ArgusValue":"test","EdcValue":"test","ValuesMatch":"Y","Status":"test","DmComments":"asdfasdf","PvComments":"222","DateCreated":"0001-01-01T00:00:00"},{"Id":4,"StudyName":"asdfasdf","Subjid":"test","MatchId":"test","MatchSources":"test","ArgusCaseNum":"test","Field":"test","ArgusValue":"test","EdcValue":"test","ValuesMatch":"Y","Status":"test","DmComments":"asdf","PvComments":null,"DateCreated":"0001-01-01T00:00:00"}];
var crudServiceBaseUrl = "http://dev-webapp1.infinitypharm1.com/Argus.WebServices/api",
dataSource = new kendo.data.DataSource({
                            serverPaging: false,
                            serverFiltering: false,
                            serverSorting: false,
                            pageSize: 20,
                            schema: {
                                model: {
                                    id: "Id",
                                    fields: {
                                        StudyName: { type: "string" },
                                        DmComments: { type: "string" },
                                        PvComments: { type: "string" }
                                    }
                                }
                            },
                            batch: false,
                            transport: {
                                create: {
                                    url: crudServiceBaseUrl + "/argus",
                                    contentType: "application/json",
                                    type: "POST"
                                },
/*
                                read: {
                                    url: crudServiceBaseUrl + "/argus",
                                    contentType: "application/json",
                                    success: function(result) {
            options.success(result);
         }
                                },
                                */

read: function (options) {
options.success(localData); // where data is the local data array
},

update: {
                                    url: function (entity) {
                                        return crudServiceBaseUrl + "/argus/" + entity.Id;
                                    },
                                    contentType: "application/json",
                                    type: "PUT"
                                },
                                destroy: {
                                    url: function (entity) {
                                        return crudServiceBaseUrl + "/argus/" + entity.Id;
                                    },
                                    contentType: "application/json",
                                    type: "DELETE"
                                },
                                parameterMap: function (data, operation) {
                                    return JSON.stringify(data);
                                }
                            }
                        });

                    $("#grid").kendoGrid({
                        height: 600,
                        columns: [
                            { field: "StudyName", title: "Study Name" },
                            { field: "DmComments", title: "DM Comments" },
                            { field: "PvComments", title: "PV Comments" },
                            //{ command: "destroy", title: "Delete", width: "110px" }
                            { command: ["edit", "destroy"], title: "&nbsp;", width: "172px" }
                        ],
                        pageable: true,
                        sortable: true,
                        filterable: true,
                        editable: "inline", //true, // enable editing
                        //toolbar: ["create", "save", "cancel"], // specify toolbar commands
                        toolbar: ["create"],
dataSource: dataSource
                    });


});

Alexander Valchev
Telerik team
 answered on 30 Sep 2013
8 answers
125 views
Hi,

I'm writing a phonegap (3.0) app with Kendo UI Mobile.
I need to load 'remote' views from a web service. I know a remote view under phonegap is just another file on the local filesystem, which is not what I want.

I'm currently exploring using AJAX to request a view and insert it into the DOM, but when I do this I lose my application layout (header title and tabbar footer).
Do you have any information on the best practice for this use case?

I've got loads more information and different techniques I've tried, but will save all that unless it's helpful.

Thanks,
Robin
Kiril Nikolov
Telerik team
 answered on 30 Sep 2013
3 answers
441 views
I would like the tooltip to temporarily show when you hover over the target (and then disappear when you move mouse away)... but I would like the tooltip to stay when you click on the target (then go away when you click on the target again).

I have figured out how to do both of the above but I can't figure out how to combine them so the same target can use both behaviors.

Thanks
Alexander Popov
Telerik team
 answered on 30 Sep 2013
1 answer
34 views
Is there a page or list i can access on this forum that shows all the posts that I have either started or posted on?  Furthermore, is there a way I can "subscribe" to a thread so that I can get emails whenever there is activity on that thread?

Thanks
Sebastian
Telerik team
 answered on 30 Sep 2013
9 answers
528 views
I'm trying to get a DropDownList to work in my mobile application and when I set the script reference to kendo.all.min.js, I get a blank view.  But when I change it to kendo.mobile.min.js, the view renders properly but I don't get my DropDownList.  Any thoughts?

Here is my mobile layout head section.

<link href="@Url.Content("~/Content/kendo/2013.2.801/kendo.common.min.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/kendo/2013.2.801/kendo.default.min.css")" rel="stylesheet" />
<link href="@Url.Content("~/Content/kendo/2013.2.801/kendo.mobile.all.min.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/mobile/mobile-styles.css")" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/kendo/2013.2.801/jquery.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/kendo/2013.2.801/kendo.all.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/json2.min.js")" type="text/javascript"></script>
Here is my loadGroups() javascript method.  It doesn't get past the "if" statement - kendo.ui.DropDownList.

01.var body = $(".km-pane");
02. 
03.function loadGroups() {
04.    console.log("trying to load the groups...");
05.    if (kendo.ui.DropDownList) {
06.        $("#group-editor").kendoDropDownList({
07.            popup: { appendTo: body },
08.            animation: { open: { effects: body.hasClass("km-android") ? "fadeIn" : body.hasClass("km-ios") || body.hasClass("km-wp") ? "slideIn:up" : "slideIn:down" } },
09.            dataSource: {
10.                transport: {
11.                    url: '/api/group/getgroupsforuser',
12.                    type: 'GET',
13.                    dataType: 'json'
14.                }
15.            },
16.            dataTextField: "GroupName",
17.            dataValueField: "Id"
18.        });
19.    }
20.}
Any ideas how I can get a DropDownList to work in my mobile application?

Thanks.
Alexander Valchev
Telerik team
 answered on 30 Sep 2013
1 answer
106 views
We are using the MVC implementation of KendoUI.

I'm trying to create a form with grids/charts that are driven by whatever value is set in the drop down menu.

For instance the page has a datagrid to display all the visitors to a site, and a graph to model all that data but I need both the grid and the graph to be limited by what site is selected inside the drop down menu.

So if KendoUI is selected in the drop down menu I just want the grid to show all the vistors to KendoUI and the chart to only model the vistors to KendoUI.

How do I link the components together?

I tried using ViewBag to link the items but the problem is each time the user changes the drop down list value I am currently having to do a post back to retrieve the value and re-render the page.

What is the correct way to do this with KendoUI? How do I make a control dependent on another control?

Here is my drop down list, grid and chart:
@(Html.Kendo().DropDownList()
        .Name("ddlClient")
        .HtmlAttributes(new { style = "width: 273px; font-size: 1.5em;"})
        .DataTextField("ClientName")
        .DataValueField("ClientName")
        .DataSource(source => {
            source.Read(read =>
            {
                read.Action("GetClientList", "Home");
            }); 
        })
        .Events(e => e.Change("changeClient"))
        .Value(ViewBag.ClientName)
    )


@(Html.Kendo().Chart<KendoWithChart.Models.ActualHedgeRatio>()
                .Theme("BlueOpal")
                .Name("chartActualHedgeRatio")
                .Legend(legend => legend
                    .Position(ChartLegendPosition.Right)
                )
                .ChartArea(chartArea => chartArea
                    .Background("transparent")
                )
                .SeriesDefaults(seriesDefaults =>
                    seriesDefaults.Bar().Stack(true)
                )
                .DataSource(ds => ds.Read(read => read.Action("GetActualHedgeRatioData", "Home")))
                .Series(series =>
                {
                    series.Bar(model => model.Strips);
                    series.Bar(model => model.Forwards);
                    series.Bar(model => model.Futures);
                    series.Bar(model => model.Swaps);
                    series.Bar(model => model.Swaptions);
                    series.Bar(model => model.LDFI);
                })
                .CategoryAxis(axis => axis
                    .Categories("Actual Hedge Ratio")
                    .MajorGridLines(lines => lines.Visible(false))
                )
                .ValueAxis(axis => axis
                    .Numeric()
                    .Line(line => line.Visible(false))
                )
                .Tooltip(tooltip => tooltip
                    .Visible(true)
                    .Format("{0}%")
                )
            )


@(Html.Kendo().Chart<KendoWithChart.Models.ActualHedgeRatioTimeSeries>()
    .Name("chartActualHedgeRatioTimeSeries")
    .Title("Actual Hedge Ratio")
    .Legend(legend => legend
        .Position(ChartLegendPosition.Bottom)
    )
    .ChartArea(chartArea => chartArea
        .Background("transparent")
    )
    .DataSource(ds => ds.Read(read => read.Action("GetActualHedgeRatioTimeSeriesData", "Home", new { ddlClient = @ViewBag.ClientName, dpkDate = @ViewBag.Date })))
    .Series(series =>
    {
        series.Area(model => model.Value1, model => model.Date).Name("Nuclear");
        series.Area(model => model.Value2, model => model.Date).Name("Hydro");
        series.Area(model => model.Value3, model => model.Date).Name("Wind");
    })
    .CategoryAxis(axis => axis
        .Date()
        .BaseUnit(ChartAxisBaseUnit.Days)
    )
    .ValueAxis(axis => axis.Numeric()
        .Labels(labels => labels.Format("{0:N0}"))
    )
    .Tooltip(tooltip => tooltip
        .Visible(true)
        .Format("{0:N0}")
    )
)




Georgi Krustev
Telerik team
 answered on 30 Sep 2013
11 answers
1.2K+ views
Jquery client validation  on "blur" and "keyup" and so on works only after the first submit attempt. Try the following scenario in attached application:
1.  Type correct number into field "Count2"
2. Click outside the numericbox to loose focus
3. Clear the numericbox. Validation message "Field is required" does not appear.
3. Click outside the numericbox to loose focus. Validation message "Field is required" does not appear.
4. Click submit button. Validation message "Field is required" appears. From this moment validation begins working as expected.
5. Start to type correct number. Validation message disappears.
6. Clear the numeric box. Validation message appears again

Why  validation message does not appear at steps 3 and 4? It appears correctly at step 3 for simple HTML text input and even for Kendo datepciker, but not for Kendo numericbox.


Alexander Valchev
Telerik team
 answered on 30 Sep 2013
3 answers
123 views
Hi, 

I've got the following code for my tabs trip, and the icons appear properly when loaded into Safari or Firefox, but when using an iOS 7 device they are not appearing correctly.  The attached screenshot shows how they appear on the iOS 7 device. 

The code for the tabs trip is embedded in a layout.  
Here's the gist showing the relevant code:
  https://gist.github.com/johncclayton/54ba76aa355d8ea74475

I'm using KendoUI mob version: 2013.2.923

Thanks!











Kamen Bundev
Telerik team
 answered on 30 Sep 2013
7 answers
110 views
Hi,

1. "cancel changes" also deletes saved records.
2. dirty flags disappear on "add new record" click without saving the edits

Kind regards
Axel

Nikolay Rusev
Telerik team
 answered on 30 Sep 2013
1 answer
788 views
Hi,

I would like to trigger a function on lost focus for ComboBox separately from change event. Meaning I would like to call one function on change event, but another on lost focus.

Is that possible?

Best regards
Kiril Nikolov
Telerik team
 answered on 30 Sep 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?