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

[Solved] Ajax().Select from a different controller

1 Answer 18 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.
Santa
Top achievements
Rank 1
Santa asked on 09 Mar 2012, 07:44 PM
Hi

The view with my telerik content on is in the HomeController and on the Index View.

If I use   .DataBinding(dataBinding => dataBinding.Ajax().Select("_FirstLook","Grid")) it returns nothing

How do I .Select from a different controller and action?


<%= Html.Telerik().Grid(Model)
            .Name("Grid")
            .Columns(columns =>
            {
                columns.Bound(o => o.OrderID).Width(100);
                columns.Bound(o => o.ContactName).Width(200);
                columns.Bound(o => o.ShipAddress);
                columns.Bound(o => o.OrderDate).Format("{0:MM/dd/yyyy}").Width(120);
            }
            )
            .DataBinding(dataBinding => dataBinding.Ajax().Select("_FirstLook","Grid"))
            .Pageable()
            .Sortable()
            .Scrollable()
            .Groupable()
            .Filterable()
         
%>

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Telerik.Web.Mvc;
 
namespace Test
{
 
    public partial class GridController : Controller
    {
 
        [GridAction]
        public ActionResult _FirstLook()
        {
            return View(new GridModel(GetOrderDto()));
        }
 
    }
}

1 Answer, 1 is accepted

Sort by
0
Santa
Top achievements
Rank 1
answered on 09 Mar 2012, 09:16 PM
Hi

All sorted now

The Problem was that the script registrar was not on the page.


Thanks 

S
Tags
Grid
Asked by
Santa
Top achievements
Rank 1
Answers by
Santa
Top achievements
Rank 1
Share this question
or