Telerik Forums
Kendo UI for jQuery Forum
1 answer
1.1K+ views
These are great controls... I need some help getting the best performance.

In the application, I have a Combobox (the same is true for a DropDownList, AutoComplete), as a <select> <option>. All works well with smaller list. Some of the Combobox have over 5000 items, and take 30 to 40 seconds to open. In internet explorer 8, it may not open at all. Unfortunately my user default browser is ie8. 

What is the best setup for performance? There is a lot of processing occurring on the initial click event, can that be triggered ahead of time? It needs to perform as well as an html select....

Thanks
Georgi Krustev
Telerik team
 answered on 01 Aug 2012
1 answer
364 views
HI,

I am using kendo ui grid for binding data. But as per my requirement I want that the header of grid will be invisible. How to hide the header of grid. Can any one help please?

Thanx in advance 
Remigijus
Top achievements
Rank 1
 answered on 01 Aug 2012
1 answer
2.3K+ views
I am sure I am missing something here, but I can't find how to set the PageSize in the grid using the MVC wrappers.  Snippet from setting the datasource.

    .Pageable(pager => pager
                .PageSize(20) //  This fails.
                .PageSizes(true)               
                .PageSizes(new int[] { 10,20,30 }))


In the client library there is a pageSize property.

What am I missing?

Thanks in advance
Michael
Atanas Korchev
Telerik team
 answered on 01 Aug 2012
5 answers
161 views
Hi, we recently moved the widgets in our open-source application from jQueryUI to KendoUI Web for various reasons including support for touch devices. As your site says "All Kendo UI Web widgets provide full support for touchscreen devices" however in the latest build this isn't working for some widgets, as mentioned here.

That thread addresses the calendar widget but we were unable to get the suggested fix working for the datepicker.

There is some pressure to move to a more mature widget library with touch support, so if you could let me know when to expect a fix in the stable branch I can hopefully keep KendoUI in our stack for launch. In the mean time if you could point me to the edge/unstable source I might be able to patch it for now.

Thanks in advance for your help, and thanks for your great work with KendoUI.

Simon
Top achievements
Rank 1
 answered on 01 Aug 2012
5 answers
161 views
This applies to both ComboBox and DropdownList. When the input's width is set using % to be fluid, the dropdown itself does not stay in sync once the page is rendered and then the containing size changed. In other words, the dropdown width never updates once initially rendered.

I do not believe I am overlooking anything. It also doesn't seem to matter if setting width via CSS or adding style directly to input element. See the following basic demo link as a test. Resize the window (bigger or smaller) to see the dropdown list width remain static. Note, I only tested this in Chrome: http://jsfiddle.net/4uCHx/5/ 

Thanks,
Mike 
Michael
Top achievements
Rank 1
 answered on 01 Aug 2012
5 answers
416 views
I'm trying to get sorting working on a grid that is bound to a WebAPI controller, but I am having trouble getting sorting to work right.  I have defined a grid using Kendo's MVC extensions as follows:

        @(Html.Kendo().Grid<DailyTotalsViewModel>()
              .Name("Grid")
              .Columns(cols => {
                    cols.Bound(p => p.Date).Width(60);
                    cols.Bound(p => p.Quantity)
                        .HtmlAttributes(new {style = "text-align: right"})
                        .Width(60);
                    cols.Bound(p => p.Note)
                        .Width(100);
              })
              .Pageable()
              .Sortable()
              .Scrollable()                        
              .DataSource(dataSource => dataSource.Ajax()                      
                    .Read(read =>  read.Type(HttpVerbs.Get).Url({service url here}))
                    .ServerOperation(true)
                    .Sort(s => s.Add(x => x.Date))
                    .PageSize(5)
              )
        )

And have been able to get that grid to load data from the following WebAPI method:
public class GridApiController : ApiController
{
[HttpGet]
public DataSourceResult GetDailyTotalGridRows(int? page, int? pageSize)
        {
{Retrieve DataSourceResult Here}
}
}

How do I get the sort information included in the request?  I've tried the following signatures:

public DataSourceResult GetDailyTotalGridRows(int? page, int? pageSize, SortDescriptor[] sort) 
public DataSourceResult GetDailyTotalGridRows(DataSourceRequest request)  
public DataSourceResult GetDailyTotalGridRows([DataSourceRequest] DataSourceRequest request)   

I have also tried using HttpPost instead of HttpGet, but haven't been able to get SortDescriptor data to my controller method.  

Jeff
Top achievements
Rank 1
 answered on 31 Jul 2012
1 answer
2.4K+ views
Hello,

I was wondering how I would go about changing the background color of the selected tab (not the contents of the tab, the tab heading itself, when I hover over it it turns grey but then goes back to normal once I click the tab, I want it to stay grey). I was also wondering how to change the font and font color of the tab heading once selected.

Please let me know if you need any other information, I'm not really sure how much more specific I can get without taking screenshots but I will if needed.

Clint
Top achievements
Rank 1
 answered on 31 Jul 2012
0 answers
99 views
Hi,

I am using Telerik ASP.NET MVC dropdown list. I would like to display this dropdown list as Label with the selected value set to the label based on some role based authorization scenario.

1. How would I extend/implement custom render method for Telerik ASP.NET MVC dropdown list.

2. Also If I would like to add additional properties to the telerik dropdown list by extending it. How would I achieve this.

Your time and help is highly apprciated.

Thanks,
tnr
Tnr
Top achievements
Rank 1
 asked on 31 Jul 2012
1 answer
347 views

Hello All,

I wonder if someone could describe how to architect and organize a large Web application with Kendo framework. I use EXTJS (Sencha) a lot for commercial projects. The latest version of EXTJS ( 4) has finally implemented very solid, MVC based architecture. I personally enjoy working with it.

I also work on the nonprofit projects where I mainly employ jQuery. Lately I came across Kendo UI, which I am hoping to use for the jQuery-based projects. Going through the documentation I found many examples how to deal with various Kendo widgets, but could not locate a document which would describe how to organize a large-scale Web application

I would greatly appreciate any constructive input. A tutorial with working example would be perfect

Thank you

VS

Andre Perusse
Top achievements
Rank 1
 answered on 31 Jul 2012
0 answers
130 views
I have a editable grid which has a list view in it. List view is getting populated properly but when i when i select a listview item within editable grid, All the fields get updated except the listview items.
Below is the code:

(function ($) {
    // UpdateAPI url
    var UPDATEUSER_API_URL = '/api/UserManagement/PostUpdateUser';
    // Create API url
    var CREATEUSER_API_URL = '/api/UserManagement/PostUpdateUser';
    // Delete API url
    var DELETEUSER_API_URL = '/api/UserManagement/DeleteUser';
    // Search API url
    var GETUSER_API_URL = '/api/UserManagement/GetUser';
    // Search By Id API url
    var GETUSERBYID_API_URL = '/api/UserManagement/GetUserById';
    // Get Role url
    var GETROLE_API_URL = '/api/RoleManagement/GetRole';

    var isCreating = false;

    $(function () {

        userSource =
            new kendo.data.DataSource({
                transport: {
                    read: {
                        url: GETUSER_API_URL,
                        dataType: "json"
                    },
                    update: {
                        url: CREATEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        dataType: "json",
                        type: "POST"
                    },
                    destroy: {
                        url: DELETEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        type: "DELETE",
                        dataType: "json",
                    },
                    create: {
                        url: CREATEUSER_API_URL,
                        contentType: 'application/json;charset=utf-8',
                        type: "POST"
                    },
                    parameterMap: function (options, operation) {
                        //console.log(operation);

                        if (operation == "destroy" && options.models.length > 0) {
                            return JSON.stringify(options.models[0]);
                        }
                        else if (operation !== "read" && options.models.length > 0) {
                            return JSON.stringify(options.models[0]);
                        }
                    }
                },
                batch: true,
                pageSize: 10,
                schema: {
                    model: {
                        id: "UserProfileId",
                        fields: {
                            UserProfileId: { editable: false, nullable: true },
                            Password: {
                                type: "string", validation: {
                                    required: true,
                                    password: function (input) {
                                        input.attr("data-password-msg", "Password cannot be greater than 50 characters!");
                                        return input.val().length <= 50;
                                    }
                                },
                            },
                            Username: {
                                validation: {
                                    required: true,
                                    username: function (input) {
                                        input.attr("data-username-msg", "Username cannot be greater than 50 characters!");
                                        return input.val().length <= 50;
                                    }
                                },
                            },
                            FirstName: {
                                type: "string", validation: {
                                    required: true,
                                    firstname: function (input) {
                                        input.attr("data-firstname-msg", "Firstname cannot be greater than 50 characters!");
                                        return input.val().length <= 50;
                                    }
                                },
                            },
                            LastName: {
                                type: "string", validation: {
                                    required: true,
                                    lastname: function (input) {
                                        input.attr("data-lastname-msg", "Lastname cannot be greater than 50 characters!");
                                        return input.val().length <= 50;
                                    }
                                },
                            },
                            EmailAddress: { nullable: false, validation: { required: true } },
                            IsSuperUser: { type: "boolean", validation: { required: false } },
                            RoleName: { validation: { required: true } },
                        }
                    }
                }
            });

        $("#grid").kendoGrid({
            dataSource: userSource,
            pageable: true,
            height: 400,
            toolbar: ["create"],
            columns: [
                "Username",
                { field: "Password", title: "Password", width: ".1px" },
                "FirstName",
                "LastName",
                { field: "EmailAddress", title: "Email Address", width: "170px" },
                { field: "IsSuperUser", title: "SuperUser", width: "90px" },
                {
                    field: "RoleName", title: "Roles", width: "150px", editor: role_editor
                },
                { command: ["edit", "destroy"], title: "&nbsp;", width: "210px" }],
            editable: "popup",
            edit: function (e) {
                debugger;
                if (isCreating) {
                    var window = e.container.data("kendoWindow");
                    window.title("Add new record");
                    e.container.find("a.k-grid-update").html('<span class="k-icon k-update"></span>Create');
                    //reset the flag
                    isCreating = false;
                }
                else {
                    //e.container.find("k-input k-textbox").html('<input type="text" class="k-input k-textbox" name="Username" disabled="true"/>');
                    //e.model.container.find("k-input k-textbox").html('<input type="text" class="k-input k-textbox" name="Username" disabled="true"/>');
                    document.getElementsByName("Username")[0].disabled = "true";
                }
            }
        });
        $(".k-grid-add").on("click", function (e) {
            debugger;
            isCreating = true;
            document.getElementsByName("Username")[0].disabled = "false";
        });     
    });

    function role_editor(container, options) {
        $(function () {

            $("div[data-container-for=" + options.field + "]").kendoListView({
                dataSource: {
                    type: "json",
                    transport:
                        {
                            read: GETROLE_API_URL,
                        }
                },
                pageable: true,
                selectable: "multiple",
                navigatable: true,
                editable: true,
                template: "<li>${RoleName}</li>",
                editTemplate: '<li><input type="text" data-bind="value:RoleName" name="RoleName" required="required"/></li>'
            });
        });

    }
})(jQuery);


Function written for binding the listview within the grid is marked in bold. While updating/creating any record, i am not able to insert/update the listview items in the database.
Sneha
Top achievements
Rank 1
 asked on 31 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?