MVC4 Mobile Classic
The ListView

The listview appears on the left side of the application:

Here's the markup to create the listview in the MVC 4 Mobile scaffolding:

<div data-role="menu" class="ui-body-a">
   <ul data-role="listview" data-theme="a">
     <li>@Html.ActionLink("ToDo", "Index", "ToDo")</li>
     <li>@Html.ActionLink("About", "About", "Home")</li>
     <li>@Html.ActionLink("Contact", "Contact", "Home")</li>
   </ul>
</div>

Just as you would with a non-MVC Mobile Application, to create the listview widget, you apply the data-role "listview" to an unordered list within a <div> with the data-role "menu". Instead of using the general < a href="..." > </a> markup, the MVC 4 Web Mobile markup uses the @Html.ActionLink Razor syntax to render the appropriate element.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum |  Documentation Feedback