开发者

jQuery grid for mvc3 razor?

What are the most recommended free jQuery grid for mvc3 razor? has good documents and sam开发者_StackOverflow中文版ples

which one is for mvc3?

  • Flexigrid: http://flexigrid.info/
  • jQuery Grid: http://www.trirand.com/blog/
  • jqGridView: http://plugins.jquery.com/project/jqGridView
  • Ingrid: http://reconstrukt.com/ingrid/
  • SlickGrid http://github.com/mleibman/SlickGrid


None is for MVC 3 or what version you want.

They all target HTML and Javascript using the jQuery Framework.

If you want to use any of those in your list, you are able to do so, just see what is the markup they want and create your grid that way.


as an example:

jQuery TableSorter 2.0

it askes for a grid with this markup

<table id="myTable" class="tablesorter"> 
<thead> 
<tr> 
    <th>Last Name</th> 
    <th>First Name</th> 
    <th>Email</th> 
    <th>Due</th> 
    <th>Web Site</th> 
</tr> 
</thead> 
<tbody> 
<tr> 
    <td>Smith</td> 
    <td>John</td> 
    <td>jsmith@gmail.com</td> 
    <td>$50.00</td> 
    <td>http://www.jsmith.com</td> 
</tr> 
<tr> 
    <td>Bach</td> 
    <td>Frank</td> 
    <td>fbach@yahoo.com</td> 
    <td>$50.00</td> 
    <td>http://www.frank.com</td> 
</tr> 
<tr> 
    <td>Doe</td> 
    <td>Jason</td> 
    <td>jdoe@hotmail.com</td> 
    <td>$100.00</td> 
    <td>http://www.jdoe.com</td> 
</tr> 
<tr> 
    <td>Conway</td> 
    <td>Tim</td> 
    <td>tconway@earthlink.net</td> 
    <td>$50.00</td> 
    <td>http://www.timconway.com</td> 
</tr> 
</tbody> 
</table> 

so, all you need to do is making that markup in your View

as a simple example:

<table id="myTable" class="tablesorter"> 
<thead> 
<tr> 
    <th>Last Name</th> 
    <th>First Name</th> 
    <th>Email</th> 
    <th>Due</th> 
    <th>Web Site</th> 
</tr> 
</thead> 
<tbody>     

@foreach(var item in Model)
{
<tr> 
    <td>@item.lastname</td> 
    <td>@item.firstname</td> 
    <td>@item.email</td> 
    <td>@item.due.ToString("c")</td> 
    <td>@item.url</td> 
</tr> 
}

</table>
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜