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

[Solved] Grid build timing out

1 Answer 13 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Allen
Top achievements
Rank 1
Allen asked on 28 Jul 2011, 03:04 PM
Hi,

since the demo I downloaded has not worked, and I have not received any comment from Telerik on this whist trying to evaluate,
I started working up my own example from the Telerik documentation to see how the grid compares for our usage with DevExpress.
I am having an issue however in that the grid is never getting built as it simply times out. Here are details:

Using this as guidance:  http://www.telerik.com/help/aspnet-mvc/telerik-ui-components-grid-data-binding-server-binding.html

(1) - created new MVC project
(2) - added EDMX diagram pointing to an existing database (MyDataEntities)
(3) - on the EDMX right-click, ran "add code generation item" to create models from existing tables
(4) - now want to use the default server side grid control

In controller, added this:

        public ActionResult Index()
        {
            ViewBag.Message = "Welcome to Main Menu";
            MyDataEntities ID = new MyDataEntities();
            return View(ID);

        }

in View, added this:

@{Html.Telerik().Grid(Model)
    .Name("Training_Course")
    .Pageable()
    .Sortable();     
  } 


If I put in breakpoint and examine "  IsolateDataEntities ID = new IsolateDataEntities();" (in index) I can see that its connected
successfuly and pulling data. I step through all the way and it goes fine until it hits the View (Html.Telerik()), then it hangs for
ages and eventually times out with error: "System.StackOverflowException was unhandled"

Any assistance from Telerik on getting a simple demo working to evaluate their products????

Allen.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 28 Jul 2011, 03:55 PM
Hi Allen,

The grid needs IEnumerable<T> or IQueryable<T> as a datasource. You also need to call the Render() method of the grid if it is used inside a @{ } block. You don't need Render if you use @( ... )

I am sending a working project showing how to bind the grid to the Orders table of the Northwind database using Entity Framework.

Regards,

Atanas Korchev
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

Tags
Grid
Asked by
Allen
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or