What is the best or easiest way to implement a drop down list using webgrid?
@{
WebGrid gridBenefits = new WebGrid(Model.Benefits, rowsPerPage: 4);
}
<div class="row">
@gridBenefits.GetHtml(
tableStyle: "table table-responsive table-striped table-bordered",
columns: gridBenefits.Columns(
gridBenefits.Column(header: "Description", format: @<text><div class="edit" data-id="@item.BenefitID" data-identity="Benefits" data-propertyname="BenefitDescription"> @item.BenefitDescription</div></text>),
gridBenefits.Column(header: "Progress", format:@<text><div class="edit" data-id="@item.BenefitID" data-identity="Benefits" data-propertyname="Progress"> @item.ProgressID</div></text>)
)
)
</div>
My model is below for the progress drop down column:
public class Progress
{
public int ProgressID { get; set; }
public string Status { get; set; }
}
I would like to display 'Status' for each ProgressID in the drop down column. For the moment it displays the ProgressID currently, how can I adapt the code to have a drop down list instead?
I have not tested this, but my thoughts are something like this: