So I have a method in my busniess logic that I am assigning defaults to and creating a List:
var ppc1Result = POCMethods.GetPPCRatesAndStatusesInRowsOverallMedSurg(PPCRatesAndStatusesInRowsOverallMedSurgDTO.Default()).ToList();
When I debug the data I want is there in the variable 'ppc1Result', but how do I use this list in a WebGrid. When I write out the column names from the list, I am getting an error saying the column name doesn't exist, here's my WebGrid:
@{
var grid = new WebGrid(ppc1Result, canPage: true, rowsPerPage: 5,
selectionFieldName: "selectedRow", ajaxUpdateContainerId: "measuresMain");
grid.Pager(WebGridPagerModes.NextPrevious);
}
<div id="measuresMain">
@grid.GetHtml(
tableStyle: "webGrid",
headerStyle: "header",
alternatingRowStyle: "alt",
selectedRowStyle: "select",
columns: grid.Columns(
grid.Column("DischargeswAtRisk", "DischargesAtRisk"),
grid.Column("DischargesWithPPC", "DischargesWithPPC"),
grid.Column("DRGType", "DRGType"),
grid.Column("NormativeRate", "NormativeRate"),
grid.Column("OverallDischargeCounts", "OverallDischargeCounts"),
grid.Column("SumWeight", "SumWeight"),
grid.Column("TotalImpact", "TotalImpact")
))
</div>
This results in an error.