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

[Solved] Server Side Data binding with .edmx in hopes of implementing .cellaction

1 Answer 29 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.
Lp1
Top achievements
Rank 1
Lp1 asked on 16 May 2011, 11:04 AM
I have tried to implement this in provided sample project, areas in question => Models = Test.edmx, Views - Home = Testing.aspx.
Looked at Telerik Demo Section , Telerik Help section and even Custom but unsuccessful so far.

As previously stated I've only had xp with ajax binding and mentioned the above and this in point 3 here and here.

1 Answer, 1 is accepted

Sort by
0
Atanas Korchev
Telerik team
answered on 24 May 2011, 09:38 AM
Hello Lp1,

There are a few of problems with Testing.aspx:

  1. There are not stylesheets (CSS files) registered. As a result the grid is not styled. Adding a StyleSheetRegistrar as per the getting started instructions help topic would help.
  2. There is no ScriptRegistrar. This is not fatal but none of the features which require JavaScript will work unless you add a ScriptRegistrar. The getting started help topic outlines this as well.
  3. Your grid is not bound to anything. It is declared empty. The server binding help topic shows that you must call the BindTo method and provide the datasource which the grid must be bound to.
<%= Html.Telerik().Grid<Order>()
        .Name("Orders")
        .BindTo((IEnumerable<Order>)ViewData["orders"])
        .Pageable()
        .Sortable()
%>
There is an alternative - passing the datasource in the grid constructor:
<%= Html.Telerik().Grid((IEnumerable<Order>)ViewData["orders"])
        .Name("Orders")
        .Pageable()
        .Sortable()
%>

I have fixed all those problems for you. Find attached the updated project

I hope this helps,
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
Lp1
Top achievements
Rank 1
Answers by
Atanas Korchev
Telerik team
Share this question
or