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

Update data in Grid

1 Answer 102 Views
Grid
This is a migrated thread and some comments may be shown as answers.
James
Top achievements
Rank 1
James asked on 05 Apr 2012, 07:19 PM
I am using Kendo grid to display the search results to used. I doing it following way but it is always giving error " Unable to get value of the property 'length': ". I checked and my json string is in correct format.

var pagePath = "Default.aspx";
 var fn = "getMenuData"
            var dataSource = new kendo.data.DataSource({
                
                transport: {
                    read: {
                        dataType: "json",
                        url: pagePath + "/" + fn,
                        contentType: "application/json; charset=utf-8",
                        type: "POST"
                    }
                },
                schema: {
                    data: "data"
                }
            });

           $("#grid").kendoGrid({
                dataSource: dataSource,
                height: 350,
                scrollable: true,
                sortable: true,
                filterable: true,
                pageable: true,
                groupable: true,
                columns: [{ title: "Menu ID", field: "MenuID" },
                    { title: "Menu Name", field: "MenuName"}]
            });

Also, how can I make it to that when user enter any value in the textbox on the page and clicks search button, the kendo grid updates its data to show search results. I tried rebind but it didn't work.

Thank you,
J

1 Answer, 1 is accepted

Sort by
0
Carlos Adriano
Top achievements
Rank 1
answered on 16 May 2012, 03:58 PM
Same issue here, may someone help us?

Thanks in advance.

Carlos Adriano Portes
Tags
Grid
Asked by
James
Top achievements
Rank 1
Answers by
Carlos Adriano
Top achievements
Rank 1
Share this question
or