This is a migrated thread and some comments may be shown as answers.

Custom Grid Filter Broken with Update 2015.1.429

2 Answers 127 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Anna
Top achievements
Rank 1
Anna asked on 01 May 2015, 05:55 PM

Hello everyone! I have a few custom grid filters that I've been using in my code that broke when I updated to the newest release of Kendo UI (2015.1.429). By broken, I mean that they don't load the optionLabel immediately and they are squashed on load. (See attached screenshot.) If I click on the dropdown, it does still load the information and the optionLabel shows, as well as it becomes the correct size, just not on load. Below is the code (js) I use for a State Filter and the grid it goes with:

 

$(document).ready(function () {
 
    function stateFilter(element) {
        element.kendoDropDownList({
            dataTextField: "Name",
            dataValueField: "Name",
            dataSource: new kendo.data.DataSource({
                schema: {
                    model: {
                        id: "StateId"
                    }
                },
                transport: {
                    read: {
                        url: "/Helper/GetStates",
                        dataType: "json"
                    }
                }
            }),
            optionLabel: "--Select Value--"
        });
    }
 
    $("#CompaniesGrid").kendoGrid({
        dataSource: new kendo.data.DataSource({
            schema: {
                model: {
                    id: "CompanyId",
                    fields: {
                        IsActive: { type: "boolean" }
                    }
                }
            },
            transport: {
                read: {
                    url: "/Company/GetCompanies",
                    dataType: "json"
                }
            },
            filter: {
                field: "IsActive",
                operator: "eq",
                value: true
            },
            pageSize: 100
        }),
        sortable: true,
        pageable: true,
        scrollable: false,
        columns: [
        {
            field: "Name",
            title: "Company",
            template: "<a href='/Company/Detail/#:CompanyId#'>#:Name#</a>"
        },
        {
            field: "City",
            title: "City"
        },
        {
            field: "State",
            title: "State",
            width: "90px",
            filterable: {
                ui: stateFilter,
                operators: {
                    string: {
                        eq: "Is equal to"
                    }
                }
            }
        },
        {
            field: "Phone",
            title: "Phone Number",
            filterable: false
        },
        {
            field: "PrimaryContactDisplay",
            title: "Primary Contact",
            template: "#if(PrimaryContactId == null){##}else{# <a href='/Contact/Detail/#:PrimaryContactId#'>#:PrimaryContactDisplay#</a> #}#"
        },
        {
            field: "IsActive",
            title: "Active",
            template: "#: IsActive ? 'Yes' : 'No' #",
            width: "90px"
        }],
        filterable: {
            extra: false,
            messages: {
                isTrue: "Yes",
                isFalse: "No"
            }
        }
    });
 
});

Note that there are two custom filters on this page: The Site Filter and the Status Filter. The Status Filter works just fine. It's just the Site Filter (and all of the other filters I use that are used similarly.) Any help here would be greatly appreciated. It's a small thing, but it bugs me. (See what I did there? :) )

Thanks!

Anna

2 Answers, 1 is accepted

Sort by
0
Anna
Top achievements
Rank 1
answered on 04 May 2015, 08:49 PM
Has anyone else experienced this bug, or is it just me? Any ideas on how to fix it? It's slowly driving me insane!
0
Nikolay Rusev
Telerik team
answered on 05 May 2015, 10:26 AM

Hello Anna,

Indeed this a bug with our drop-down widget. I've logged the issue here. You can keep track of the progress.

As a token of gratitude for bringing this problem to our attention I've updated your Telerik points.

Regards,
Nikolay Rusev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Grid
Asked by
Anna
Top achievements
Rank 1
Answers by
Anna
Top achievements
Rank 1
Nikolay Rusev
Telerik team
Share this question
or