I am new to ASP.NET MVC 3. I am trying to create a basic WebGrid to try and learn how this works. Currently, I have the following code:
@{
ViewBag.Title = "Home Page";
}
<h2>@ViewBag.Message</h2>
<p>
@{
var grid = new WebGrid();
}
@grid.GetHtml()
</p>
When I run this code, I receive an error that says: "A data source must be bound before this operation can be performed.". My question is, how do I bind this WebGrid to some client-side JSON. I don't have a back-end database. I'm just trying to learn about the WebGrid without having to wireup a database.
thanks!