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

MVC3 GRID + ORM STORED PROCEDURE + MySQL

0 Answers 28 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.
Sander
Top achievements
Rank 1
Sander asked on 31 Jul 2011, 10:01 AM
hi Folks,

I am new to MVC and i have a MVC 3 Telerik project and try to display a grid with a Telerik ORM Stored Procedure call to MySQL.

My problem is:
that the GetDetailsChannel is of type Object[] and not a model, sdo how do i bind this object to my Grid or how do make my ORM Stored Procedure of type Model?

My Controler is:
        public ActionResult Channels()
        {
            var Channels = new IMS_ORM_Telerik.EntitiesModel();
            return View(Channels.GetDetailsChannel(1));
        }

My View is:
@model IEnumerable<IMS_ORM_Telerik.Channel>
  @(Html.Telerik().Grid(Model)
.Name("Grid")
.Columns(columns =>
{
     columns.Bound(o => o.Channel_id).Title("Id").Width(50);
     columns.Template(
                @<text>                    
                    <img src="/images/@item.Channel_image"/>           
                </text>)
                .Title("Icon").Width(50);
    columns.Bound(o => o.Channel_type);

    columns.Template(
        
  @<text>
  @Html.ActionLink("Edit", "Prepare/Television", new { item.Channel_id })
     @Html.ActionLink("Delete", "Prepare/Television", new { item.Channel_id })
               
                </text>).Title("Actions").Width(100);




    columns.Bound(o => o.Channel_type).Visible(false)



                  .FooterTemplate(@<text>Total Count: @item.Count</text>)
                  .GroupFooterTemplate(@<text>Count: @item.Count</text>);
})
.Sortable()
.Filterable()
.Pageable()
.Groupable())

Hope anyone can help me out here....

Thanks Sander
Tags
Grid
Asked by
Sander
Top achievements
Rank 1
Share this question
or