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

Binding json data from MVC Web API displays only the first row data

1 Answer 172 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Pedro
Top achievements
Rank 1
Pedro asked on 21 Dec 2012, 05:17 PM
 Hi

I have a KendoUI web grid on a Asp.NET MVC 4 Razor Page. I'm using the simple jquery Kendo grid and not aspnetmvc helpers.
The read datasource is provided by an WEB API (mvc api controller) method which returns 15 data rows (attached image shows the debug mode and 15 rows).

When my page is loaded I see my grid with 15 rows and paging count/size is correct. But only the first row has data values, all other 14 rows are empty (second attached image). As you can see in my first attached image with debug mode I have data values in my third row (all rows have values) in C# object, but only the first one is filled in the grid...

With F12 in chrome we can take a look on the data returned and that seems only the first one has values (you can see it on second attached image)... WHY ? Is it a json conversion issue ?

I really don't understand what is the problem, I have already filled another grid in the same project with another Entity data type and it worked well. The difference between the two Entity data types is that the first one (which worked) don't have complex types (Entity Navigation Properties) and the second one has several complex properties and virutal Lists (referenced tables).

Any help can be appreciated.
Thanks in advance.

Best regards,
Pedro

1 Answer, 1 is accepted

Sort by
0
Petur Subev
Telerik team
answered on 25 Dec 2012, 02:08 PM
Hi Pedro,

This seems to be a serialization issue not related to kendo - I guess the same is happening if you request your data with regular $.ajax call ?

Did you try to follow the approach covered in this code library ?

Regards,
Petur Subev
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
Pedro
Top achievements
Rank 1
Answers by
Petur Subev
Telerik team
Share this question
or