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

Error while binding to XML

3 Answers 109 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric Schoenholzer
Top achievements
Rank 2
Eric Schoenholzer asked on 13 Jan 2012, 02:57 PM
I'm getting an error when I try to bind the grid to a XML datasource.

Line: 2844
Error: Unable to get value of the property 'ItemList': object is null or undefined

Seems to be at the function in kendo.all.js:
total: function(result) {
  
return this.data(result).length;

My XML:

My XML:
<?xml version="1.0" encoding="utf-8"?>
  <CreateDate>2010-09-28T01:43:50.6860364+02:00</CreateDate>
  <ItemList>
    <MovieItem>
      <Foldername>My.Family</Foldername>
....

My Datasource:

var ds = new kendo.data.DataSource({
                    transport: {
                        read: "Data/movies.xml"
                    },
                    schema: {
                        type: "xml",
                        data: "/CatalogOfMovieItem/ItemList/MovieItem",
                        model: {
                            fields: {
                                title: "Foldername/text()",
                                rootFolder: "Rootfolder/text()",
                                url: "ImdbUri/text()",
                                year: "Year/text()"
                            }
                        }
                    },
                    change: onMovieChange
                });

The datasourcce seems to be loaded correctly.
Where could be the problem?

Thanks
Eric





3 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 16 Jan 2012, 10:11 AM
Hello Eric,

The described behavior sound like an issue which we have already addressed. Therefore, could you please download the latest internal build and see if it makes any difference.

Greetings,
Rosen
the Telerik team
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Eric Schoenholzer
Top achievements
Rank 2
answered on 16 Jan 2012, 04:40 PM
Hi,

I don't get anymore the js error, so it seems this error is gone.
My problem is now with the binding.
I'm not able to bind a large XML file to a grid.
The browser is blocked and the UI is strangley corrupt, no data is shown.

So how I should I bind a large XML file (4MB) to the grid?

Thanks
Eric


0
Rosen
Telerik team
answered on 17 Jan 2012, 09:28 AM
Hi Eric,

I'm afraid the described behavior is expected having in mind the large amount of data you are trying to pass. Therefore, you should consider minimizing the data, for example by using a paging and providing only small amount of data to the DataSource.

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