1

Hello Freinds I am new to this Asp.net MVC Control.. I have a page which I implemented previously using Jquery I am dispalying the data in grid control. now I need to change that Jquery grid to Telerik grid.. I included Script in aspx page as weel as I aded telrik dll in my References..

I added all the telrik specification to the site master page and solutinos explorer..

I followed the demo in telrik site.. but I am not getting the out put result to my page.. that I can not see the grid result.. The code followed like this

I added all the telrik specification to the site master page and solutinos explorer..

and in view I wrote like this

<%Html.Telerik().Grid<TableName>()
 .Name("Grid")
    .Columns(columns =>
    {
        columns.Add(o => o.A).Width(100);
        columns.Add(o => o.B).Width(200);
        columns.Add(o => o.C);
        columns.Add(o => o.D).Width(120);
        columns.Add(o => o.E).Width(100);
    })
    .Ajax(ajax => ajax.Action("_AjaxBinding", "Grid"))
    .Pageable()
    .Sortable()
    .Scrollable();
%>

and in Controller I wrote

public ActionResult AjaxBinding()
    {
        return View();
    }
    [GridAction]
    public ActionResult _AjaxBinding()
    {
        return View(new GridModel<tableName>
        {
            Data = repository.GetAllinfo()
        });
    }

when I ran I am not getting any exceptions but I am not able to see the result in grid on the page..

this GetAllInfo code is

public IEnumerable<tableName> GetAllinfo()
    {
        //Try to retrieve clients from the cache
        var index = cache.Get<IEnumerable<tablename>>("A");

        //Check for empty cache
        if (null == index)
        {
            index = tablename.All();
            cache.Store("c", A);

        }
        return A;

    }

is there anything I need to do extra to get result in the grid view?

Thanks

2
  • If you are sure that you're getting data from the repository, I would check with Telerik. I understand they have excellent support facilities. Commented Feb 8, 2010 at 20:59
  • Yes i am sure I am getting Data from repository.. Commented Feb 10, 2010 at 17:31

1 Answer 1

2

Change this:

<% Html.Telerik().Grid<TableName>()

to this

<%= Html.Telerik().Grid<TableName>()

The grid will not emit its HTML unless <%= %> is used or the Render() method is called.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.