This question is locked. New answers and comments are not allowed.
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.
Thanks Sander
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.
Thanks Sander