Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Webgrid sample syntax
@{
var grid = new WebGrid(Model, canSort: true, canPage: false, defaultSort: "Column1Value");
}
@grid.GetHtml(
columns: grid.Columns(
grid.Column("Column1Value", "Column 1 Heading", canSort: true),
grid.Column("Column2Value", "Column 2 Heading", canSort: true),
grid.Column("Actions",
format: @<text>
@Html.ActionLink("Action Link 1 Text", "ActionLink1Command") |
@Html.ActionLink("Action Link 2 Text", "ActionLink2Command")
</text>
)
)
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.