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

Filtering Grid 'observable' error

2 Answers 21 Views
Grid
This is a migrated thread and some comments may be shown as answers.
BigzampanoXXl
Top achievements
Rank 1
BigzampanoXXl asked on 18 Jul 2014, 10:21 AM
Hello,

I have a grid which should implement server filtering. My problem is: As soon as I activate any column to be filterable I get the following error-message:
Object doesn't support property or method 'observable'

I think I miss something. Is there anything I need to reference or are my grid-settings somehow wrong? Here is my grid (Using the latest verstion of KendoUi Professional):

$("#grid").kendoGrid(
{
    dataSource: {
        transport:
        {
            read: function (options)
            {
                var gridOptions = options.data;
 
                $.ajax({
                    type: "POST",
                    url: url,
                    data: JSON.stringify({ gridOptions: gridOptions }),
                    processData: false,
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    xhrFields: {
                        withCredentials: true
                    },
                    async: false,
                    success: function (data)
                    {
                        var resultSet = eval('(' + data.d + ')');
                        var returnValue = resultSet.Value;
 
                        if (resultSet.HasMoreData)
                            returnValue.total = (options.data.page - 1) * options.data.pageSize + resultSet.Value.length + 1;
                        else
                            returnValue.total = (options.data.page - 1) * options.data.pageSize + resultSet.Value.length;
 
                        options.success(returnValue);
                    },
                    error: function (e)
                    {
                        alert(e);
                    }
                });
            }
        },
        schema: {
            total: 'total',
            model: {
                fields: {
                    datefield: { type: "date" }
                }
            }
        },
        pageSize: 20,
        serverPaging: true,
        serverFiltering: true,
        serverSorting: true
    },
    filterable: true,
    pageable: {
        numeric: false,
        messages: {
            display: "{0} - {1}"
        }
    },
    dataBound: OnDataBound,
    columns: [
    {
        field: "datefield",
        title: "Date",
        format: "{0:MM/dd/yyyy}"
    }]
});


I hope someone can help me. Without the filtering-option everything works fine!

Thank you,
Best regards

2 Answers, 1 is accepted

Sort by
0
Accepted
Rosen
Telerik team
answered on 18 Jul 2014, 02:09 PM
Hi,

Unfortunately, I'm unable to observe the error you have described using the provided information. Here is a test page which use the code snippet you have pasted. Please, take a look, maybe I'm missing something obvious.

Regards,
Rosen
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
BigzampanoXXl
Top achievements
Rank 1
answered on 25 Jul 2014, 09:47 AM
Hi Rosen,

thank you for your reply. You helped me a lot. After minifying my grid more and more I realised that somewhere else was the problem. I am referencing the js-files of kendo one by one (I don't use the kendo.all.js). I missed the reference of "kendo.binder.js" - didn't know that it's important for that. But now everything works fine..

Thank you very much!
Tags
Grid
Asked by
BigzampanoXXl
Top achievements
Rank 1
Answers by
Rosen
Telerik team
BigzampanoXXl
Top achievements
Rank 1
Share this question
or