Closed dm7777 closed 8 years ago
Hi
I figured out how to achieve the effect by using the following:
@using (var listGroup1 = @Html.Bootstrap().ListGroup().AddCss("", "list-group list-group-sortable-connected").SetId("sortable3").Begin())
{
foreach (var item in Model.MyDataList)
{
@listGroup1.ListGroupItem(item.Text).AddCss("", "list-group-item list-group-item-info")
}
}
Thanks
:thumbsup: Glad you were able to figure it out - just let me know if you have any other questions.
Hello
I am trying apply styles to the list items generated by @Html.Bootstrap().ListFor
It applys the CSS style correctly to the UL it generates to contain the LI
This need has come becuase I am trying to use this in conjunction with Bootstrap HTML5 Sortable jQuery Plugin at https://github.com/psfpro/bootstrap-html5sortable which requires it have a class for the LI to be properly styled
I am using asp.net mvs razor and the model is passed into the View via my controller
Many thanks in advance