Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
3.00/5 (1 vote)
I am getting this error while i am trying to populate data on grid please help me out .. i tried my best

I am using MVC 5

My Controller
C#
public ActionResult Index()
       {

WifyConnectEntities wc = new WifyConnectEntities();

              IEnumerable<Connected_User> connected = wc.Connected_User;

              return View(connected);
}

View
HTML
@model IEnumerable<MarketingEngine.Connected_User>

@using System.Web.Mvc.Html

@using GridMvc.Html

@{
    ViewBag.Title = "Index";
}

<h2>Welcome   @Convert.ToString(Session["BusinessUser"])</h2>

@Html.ActionLink("Refresh The List", "Refresh")

<html>
<head>
   
    <link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" />
    <link href="@Url.Content("~/Content/bootstrap.min.css")" rel="stylesheet" />
    <script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"></script>
    <script src="@Url.Content("~/Scripts/gridmvc.min.js")"></script>
    <title>Index</title>
</head>
<body>
     <div style="width:500px;">

         

        @Html.Grid(Model).Columns(columns => 
                    {
                        columns.Add(c => c.User_ID).Titled("User_ID");
                        columns.Add(c => c.Session_Start).Titled("Session_Start").Filterable(true);
                        columns.Add(c => c.Duration).Titled("Duration");
                    }).WithPaging(3).Sortable(true)
    </div>
    </body>
<html>
Posted
Updated 19-Feb-14 18:50pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900