This question is locked. New answers and comments are not allowed.
I am not sure what am I doing wrong, but I am not seeing a single row in my grid, the gris is displayed, but there are no rows. Althought I have rows in the database. I have only one table in my LINQ to sql. I just want to display the columns from that table. I have a BindingController and repImportController under controllers. Below is the code for Binding controler and then repImportController
and repImportController
My view looks like this
I inlcuded the LINQ assembly in my web.config file.
I am totally stuck. Reviewd my code 5-6 times. Don't know what am I doing wrong.
Any help will be greatly appreciated.
using System; using System.Collections.Generic; using System.Linq; using System.Data.Linq; using System.Web; using System.Web.Mvc; using RepDataImport.Models; namespace RepDataImport.Controllers { public partial class BindingController : Controller { // // GET: /Binding/ private static IQueryable<DOWNLOAD_FAILURE> GetFailures() { repTestDataContext rep = new repTestDataContext(); return rep.DOWNLOAD_FAILUREs; } } } and repImportController
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Mvc; using RepDataImport.Models; using Telerik.Web.Mvc; namespace RepDataImport.Controllers { public partial class BindingController : Controller { public ActionResult RepBinding() { return View(); } [GridAction] public ActionResult _RepBinding() { return View(new GridModel(GetFailures())); } } } My view looks like this
<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> <%@ Import Namespace="RepDataImport.Models" %> <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server"> <%=Html.Telerik().Grid<DOWNLOAD_FAILURE>() .Name("Grid") .Columns(columns => { columns.Bound(d => d.id).Title("ID"); }) .DataBinding(dataBinding => dataBinding.Ajax().Select("_RepBinding", "Grid")) .Sortable() .Scrollable() .Pageable() %> </asp:Content> I inlcuded the LINQ assembly in my web.config file.
I am totally stuck. Reviewd my code 5-6 times. Don't know what am I doing wrong.
Any help will be greatly appreciated.