Requirements |
|
RadControls MVC VS Extensions 2011.02.712.0 WebUI VSExtensions 2011.02.831.0 |
|
.NET 4 |
|
Visual Studio 2010 |
|
C# |
|
browser support |
all browsers supported by RadControls |
PROJECT DESCRIPTION
Just starting off using the controls. Familar with MVC 3, asp.net 4
Web Service for handling alot timeline content of pictures, text.
I have been going through the examples and searching the forums. I have seen some close examples, but after several hours. I'm stuck
The issue is that I get a DataTable back from a DAL.DLL. I want to hand that to the Telerik.Grid and have it displayed.
The datatable is ok, i pass it and to the View(datatable) and run into my first issue.
Not able to cast this datatable into something Razor View will pass to the Telerik Grid.
Inside some of your code examples the "GridModel" takes a DataTable, but unable to pass this to the View.
So I went back to trying to use the DataTable. One of your example is the form show passing a DataTable, it was in aspx not Razor syntax. But it didn't work.
Below is code pattern i have distilled it down to after several tries.
Thanks Larry
I keep getting an error on the site
Controller Code------------------
DataTable dtProjectTable = Test.DAL.Project.ListMyProjects(guidName.ProviderUserKey.ToString());
Return View(dtProjectTable );
View Code-------------------
@model ???????????????????????? <-- here's where I fail
@{ Html.Telerik().Grid(Model)
.Name("Grid")
.Columns ( columns =>
{
columns.Bound(o => o.Name);
columns.Bound(o => o.Modified)
})
.Sortable()
.Scrollable()
.Pageable()
.Render();
}