Here is the code I have so far just to see if I can pull the data:
@using WebMatrix.Data;
@{//title of tab
ViewBag.Title = "All Metrics";
var db = Database.Open("Metrics") ;
var selectCommand = "SELECT * FROM MetricName";
var searchTerm = "";
}
<div>
@grid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
columns: grid.Columns(
grid.Column(format: @<a href="~/EditMovie?id=@item.ID">Edit</a>),
grid.Column("Title"),
grid.Column("Genre"),
grid.Column("Year"),
grid.Column(format: @<a href="~/DeleteMovie?id=@item.ID">Delete</a>)
)
)
</div>
But get the error:
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: CS0103: The name 'grid' does not exist in the current context
Source Error:
Line 11:
Line 12: <div>
Line 13: @grid.GetHtml(
Line 14: tableStyle: "grid",
Line 15: headerStyle: "head",
Source File: c:\Users\rflowers\Documents\Visual Studio 2010\Projects\L1DashboardNew\L1DashboardNew\Views\Home\Index.cshtml Line: 13
Show Detailed Compiler Output:
Show Complete Compilation Source:
Any thoughts?

New Topic/Question
Reply



MultiQuote




|