Telerik Forums
Kendo UI for jQuery Forum
1 answer
84 views
I have an object that is nested, and want to have a grid that shows a hierarchy from that, without (as the examples are shown) ajax to get the data for each parent.  Is that possible?

For example
The object (Authors) with a Books Collection.

I don't want to query through to an object to get the books for each author, rather I've already got it.

Does the hierarchy require Ajax calls via DataSource()?


Nikolay Rusev
Telerik team
 answered on 11 Sep 2013
1 answer
38 views
Hi,
can you please change jquery.min to jquery-min in the next upgrade?

it will help anyone who uses MVC as jquery-min is loaded first by default.

P.S.
of course there is a workaround but it is still better to have the defaults synchronized
Kiril Nikolov
Telerik team
 answered on 11 Sep 2013
4 answers
118 views
Hi All,

I have a listview that binds to a list of products. Products have a quantity property, which will be specified by users.
I'd like to allow user to adjust quantity using "-" or "+" buttons. Basically, something like this: 

 
 Product Name                                               - (10) + 

Could anyone help me with this? A jsfiddle snippet would be perfect. 


Thanks, 
Jeff
Top achievements
Rank 1
 answered on 10 Sep 2013
1 answer
137 views
Hi,

I'm trying to build a site to 640px wide and have it scale to the width of whichever device you're using. I'm currently testing on a Galaxy Nexus, at 480px wide and of course it's not displaying the entire width of my site. 

I see that Kendo sets the viewport meta itself and that it's ill-advised to override it, but is there another way to achieve this?

Regards,
K.
Kamen Bundev
Telerik team
 answered on 10 Sep 2013
3 answers
925 views
Hi,

I'm using the grid control in my MVC 4 application to display selected columns of records.

I don't want to edit or create items from the grid, (i.e.the grid's built in popup/inline capabilities)

I want to transition to another page to do my creates and edits.

Can I override the default behavior of the create and edit buttons?

Below is an example of my grid:

$(function () {
 
    // select the employeesGrid empty div and call the
    // kendoGrid function to transform it into a grid
    var grid = $("#employeesGrid").kendoGrid({
        // specify the columns on the grid
        columns: [
                { title: "", template: "<input type='checkbox' />" },
                { field: "FirstName", title: "First Name" },
                { field: "LastName", title: "Last Name" },
                "Title",
                "City",
                { field: "BirthDate", title: "Birthday", template: '#= kendo.toString(BirthDate,"MM/dd/yyyy") #' },
                { command: ["edit", "destroy"], title: " " }
        ],
        // the datasource for the grid
        dataSource: new kendo.data.DataSource({
            // the transport tells the datasource what endpoints
            // to use for CRUD actions
            transport: {
                read: "api/employees",
                update: {
                    // get the id off of the model object that
                    // kendo ui automatically passes to the url function
                    url: function (employee) {
                        return "api/employees/" + employee.Id
                    },
                    type: "POST"
                },
                destroy: {
                    // get the id off of the model object that
                    // kendo ui automatically passes to the url function
                    url: function (employee) {
                        return "api/employees/" + employee.Id
                    },
                    type: "DELETE"
                },
                parameterMap: function (options, operation) {
                    // if the current operation is an update
                    if (operation === "update") {
                        // create a new JavaScript date object based on the current
                        // BirthDate parameter value
                        var d = new Date(options.BirthDate);
                        // overwrite the BirthDate value with a formatted value that WebAPI
                        // will be able to convert
                        options.BirthDate = kendo.toString(new Date(d), "MM/dd/yyyy");
                    }
                    // ALWAYS return options
                    return options;
                }
            },
            // the schema defines the schema of the JSON coming
            // back from the server so the datasource can parse it
            schema: {
                // the array of repeating data elements (employees)
                data: "Data",
                // the total count of records in the whole dataset. used
                // for paging.
                total: "Count",
                model: {
                    id: "Id",
                    fields: {
                        // specify all the model fields, along with validation rules and whether or
                        // not they can be edited or nulled out.
                        FirstName: { editable: false },
                        LastName: { editable: true, nullable: false, validation: { required: true } },
                        Address: { editable: true, nullable: false, validation: { required: true } },
                        City: { editable: true, nullable: false, validation: { required: true } },
                        BirthDate: { editable: true, type: "date" }
                    }
                },
                // map the errors if there are any. this automatically raises the "error"
                // event
                errors: "Errors"
            },
            error: function (e) {
                console.log(e.statusText);
            },
            // the number of records to show per page
            pageSize: 3,
            // do paging on the server
            serverPaging: true
        }),
        // paging is enabled in the grid
        pageable: true,
        // editing happens inline, one row at a time.
        editable: "popup",
        groupable: true
    }).data("kendoGrid");
 
});
kashyapa
Top achievements
Rank 1
 answered on 10 Sep 2013
2 answers
139 views
I apologize if this is listed somewhere but I cannot find it. Is there a way to have the cursor change to a pointer on the Axis Label? Specifically if the axisLabelClick is enabled then it would be nice if the cursor changes.
Richard
Top achievements
Rank 1
 answered on 10 Sep 2013
1 answer
43 views
I am using kendogrid to display data, when i load data to grid initially number of items in the grid is zero. when i sort the column in ascending or descending order it shows number of items in the grid. 


Alexander Popov
Telerik team
 answered on 10 Sep 2013
1 answer
213 views
Hi,

I am trying to use Kendo Line Chart for my application and I want to know how i can add Lines dynamically I am using ASP.NET MVC (Razor).

So far this is what I have

@(Html.Kendo().Chart(Model.colorCart)
.Name("chart")
.Title("15°")

.Legend(legend => legend
.Position(ChartLegendPosition.Left)

)
.ChartArea(chartArea => chartArea
.Background("transparent")
)

.Series(
series =>
{
series.Line(l => l.Std_values).Name("Std"); //To be added dynamically 
series.Line(l => l.Start_values).Name("Start"); //To be added dynamically 
series.Line(l => l.Pred_values).Name("Pred"); //To be added dynamically 
series.Line(l => l.End_values).Name("End"); //To be added dynamically 
series.Line(l => l.Select_values).Name("Select"); //To be added dynamically 
}
)
Iliana Dyankova
Telerik team
 answered on 10 Sep 2013
4 answers
142 views
Hi!

I just upgraded to the latest version of Kendo UI and now my charts wont render any more when I resize my mobile browser window.

In short, this is what I do:

I have two list views. The first one shows avaiable charts to display. The second one show the actual chart.
When a user clicks on a item in the first listview, I create the chart in the click event.
I then do a app.navigate("#chartView");
(In my test, the chart is bound to a static Array of data.)

The chart is displayed correctly, but then the user tilts his/her screen, the chart is redrawn but now no series or data is displayed in the chart. Only the axis is shown.

My resize function:
$(window).resize(function() {    // for any chart or gauge widget
    $("#chart").data("kendoChart").redraw();
});

This all worked before the update, what has changed?

Regards
Per


Per
Top achievements
Rank 1
 answered on 10 Sep 2013
4 answers
249 views

Hi,
       I am using kendo chart with ajax binding.
       I need to prevent the ajax call (read) when chart initialization.
       Ajax call should occured only when firing from a button.
       Is it possible to set the Autobind property for chart?

      @(Html.Kendo().Chart<foo>()
                .Name("foo")
                       
        .Legend(legend => legend.Position(Kendo.Mvc.UI.ChartLegendPosition.Right))
        .Title("foo| ")
        
        .SeriesDefaults(seriesDefaults =>
            seriesDefaults.Column().Stack(true)
        )
        .DataSource(dataSource => dataSource
          .Read(read => read.Action("foo", "foo").Data("foo")




          )
                   .Group(group => group.Add(model => model.id))
                   .Sort(sort => sort.Add(s => s.id))
         )


       .Series(series =>
        {




            series.Column(x => x.ExecutionTime).Name(string.Empty);


        })




        .CategoryAxis(axis => axis
                    .Categories(m => m.DayFormat)








        )
        .ValueAxis(axis => axis
            .Numeric().MajorUnit(10).Title("Minutes")
        )


                  .Events(events => events.SeriesHover("onSeriesHover").SeriesClick("onSeriesClick").AxisLabelClick("onAxisLabelClick"))
                    
        )
    
Jacques
Top achievements
Rank 2
 answered on 10 Sep 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?