I saw this line of code from a sample application:
grid.Column(format: @<a href="~/[email protected]">Edit</a>)
The complete snippet looks like this:
@grid.GetHtml(
tableStyle: "grid",
headerStyle: "head",
alternatingRowStyle: "alt",
columns: grid.Columns(
grid.Column(format: @<a href="~/[email protected]">Edit</a>),
grid.Column("Title"),
grid.Column("Genre"),
grid.Column("Year")
)
)
It's supposed to render a column with the Edit hyperlink.
I'm new to Razor and the webgrid. Could someone please explain how that line of code works. The code is in C#.