参考学习  http://bootstrap-table.wenzhixin.net.cn/getting-started/

包括Bootstrap库(如果你的项目没有使用它)和bootstrap-table.csshead标签你的html文档。

<link rel="stylesheet" href="bootstrap.min.css">
<link rel="stylesheet" href="bootstrap-table.css">

包括jQuery库,引导程序库(如果您的项目没有使用它),并bootstrap-table.js在头标签或文档的最底部,在关闭正文标记之前(通常建议为了更好的性能)。

<script src="jquery.min.js"></script>
<script src="bootstrap.min.js"></script>
<script src="bootstrap-table.js"></script>
<script src="bootstrap-table-zh-CN.js"></script>

Example:

  

<script type="text/javascript">
$(document).ready(function () {
$('#table').bootstrapTable({
columns: [
{ field: 'Seq', title: 'Seq', width: 30, align: 'center', "colspan": 1 },
{ field: 'BOL', title: 'BOL', width: 120, align: 'center', "colspan": 1 },
{ field: 'IsUrgent', title: '加急', width: 30, align: 'center', "colspan": 1 },
{ field: 'PickState', title: '拣配状态', width: 60, align: 'center', "colspan": 1 },
{ field: 'PreAllocationState', title: '包装状态', width: 60, align: 'center', "colspan": 1 },
{ field: 'DNCount', title: 'DN', width: 30, align: 'center', "colspan": 1 },
{ field: 'Request', title: 'Request', width: 60, align: 'center', "colspan": 1 },
{ field: 'UrgentTime', title: 'UrgentTime', width: 60, align: 'center', "colspan": 1 }
],
        

cache:false,
icons:{ paginationSwitchDown: 'glyphicon-collapse-down icon-chevron-down',
paginationSwitchUp: 'glyphicon-collapse-up icon-chevron-up',
refresh: 'glyphicon-refresh icon-refresh',
toggle: 'glyphicon-list-alt icon-list-alt',
columns: 'glyphicon-th icon-th',
detailOpen: 'glyphicon-plus icon-plus',
detailClose: 'glyphicon-minus icon-minus'},

            pageList: [10, 25, 50, 100, 200]
});
$.ajax({
url: "/FRUInventoryBarCodeMobile/GetShipmentList",
type: "POST",
data: {},
datatype: "json",
success: function (data) {
if (data.msgType == "success") {
$('#table').bootstrapTable('load', data.rows);
}
else if (data.msgType == "error") {
layer.open({
content: data.msg
, skin: 'msg'
, time: 2 //2秒后自动关闭
});
}
}
}) })
</script> <body>
<div class="panel-body">
<div id="toolbar" class="btn-group">
<button id="btn_edit" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-pencil" aria-hidden="true"></span>修改
</button>
<button id="btn_delete" type="button" class="btn btn-default">
<span class="glyphicon glyphicon-remove" aria-hidden="true"></span>删除
</button>
</div>
</div>
<table id="table" data-striped="true" @*stripe the rows*@
data-pagination="true" @*show a pagination toolbar on table bottom.*@
data-show-columns="true" @*show the columns drop down list.*@
data-toolbar="#toolbar" @*A jQuery selector that indicates the toolbar, for example:#toolbar, .toolbar, or a DOM node.*@
data-search="true" @*Enable the search input.*@
data-show-toggle="true" @*show the toggle button to toggle table / card view.*@
data-maintain-selected="true" @*True to maintain selected rows on change page and search.*@
      data-icons-prefix="glyphicon"> @*添加自定义图标*@
</table>
</body>

后台取数据:

   public ActionResult GetShipmentList(FormCollection fc)
{
LogHelper lh = new LogHelper();
if (user != null)
{
DBConn = user.DBConn.ToString();
}
else
{
return RedirectToAction("Login", "P2Mobile");
}
JsonMsg jsmsg = new JsonMsg();
var arrlist = p2mobile_inventorybarcodeibll.GetShipmentList(DBConn);
if (arrlist.Count > )
{
int total = arrlist.Count;
return Json(new { msgType = JsonMsgType.Success, total = total, rows = arrlist }, JsonRequestBehavior.AllowGet);
}
return Json(new { msgType = JsonMsgType.Error, msg = "未找到相关数据" }, JsonRequestBehavior.AllowGet);
}

bootstrap-table学习的更多相关文章

  1. .Net MVC+bootstrap Table学习

    一.效果展示 二.使用方法 1).相关css和js的引用 <link href="~/Themes/Bootstrap/css/bootstrap.css" rel=&quo ...

  2. bootstrap table 学习记录

    效果: html代码: <!-- 工具容器 --> <div id="toolbar" class="btn-group"> <b ...

  3. Bootstrap Table使用方法详解

    http://www.jb51.net/article/89573.htm bootstrap-table使用总结 bootstrap-table是在bootstrap-table的基础上写出来的,专 ...

  4. 后台系统组件:一丶bootstrap table

    http://www.cnblogs.com/landeanfen/p/4976838.html (bootstrap table) http://www.cnblogs.com/landeanfen ...

  5. 轻量级表格插件Bootstrap Table。拥有强大的支持固定表头、单/复选、排序、分页、搜索及自定义表头等功能。

    Bootstrap Table是轻量级的和功能丰富的以表格的形式显示的数据,支持单选,复选框,排序,分页,显示/隐藏列,固定标题滚动表,响应式设计,Ajax加载JSON数据,点击排序的列,卡片视图等. ...

  6. ABP+AdminLTE+Bootstrap Table权限管理系统一期

       学而时习之,不亦说乎,温顾温知新,可以为师矣. 这也是算是一种学习的方法和态度吧,经常去学习和总结,在博客园看了很多大神的文章,写下一点对于ABP(ABP是“ASP.NET Boilerplat ...

  7. ABP+AdminLTE+Bootstrap Table权限管理系统第五节--WBEAPI及SwaggerUI

    一,Web API ABP的动态WebApi实现了直接对服务层的调用(其实病没有跨过ApiController,只是将ApiController公共化,对于这一点的处理类似于MVC,对服务端的 调用没 ...

  8. ABP module-zero +AdminLTE+Bootstrap Table+jQuery权限管理系统第十二节--小结,Bootstrap Table之角色管理

    返回总目录:ABP+AdminLTE+Bootstrap Table权限管理系统一期 很多人说ABP不适合高并发大型,有一定的道理,但是我觉得还是可以的,就看架构师的能力了,哈哈,我之前公司就是ABP ...

  9. ABP module-zero +AdminLTE+Bootstrap Table+jQuery权限管理系统第十六节--SignalR与ABP框架Abp.Web.SignalR及扩展

    SignalR简介 SignalR是什么? ASP.NET SignalR 是为 ASP.NET 开发人员提供的一个库,可以简化开发人员将实时 Web 功能添加到应用程序的过程.实时 Web 功能是指 ...

  10. ABP module-zero +AdminLTE+Bootstrap Table+jQuery权限管理系统第十七节--Quartz与ABP框架Abp.Quartz及扩展

    ABP+AdminLTE+Bootstrap Table权限管理系统一期 Github:https://github.com/Jimmey-Jiang/ABP-ASP.NET-Boilerplate- ...

随机推荐

  1. 0003_Linux基础之常用命令

    1.pwd:查看当前所在目录 2.cd :切换目录 3.ls:查看当前目录下的文件及文件夹: 4.ls -l :列出当前目录下文件及详细信息         drwxr-xr-x   第一个字符为d则 ...

  2. Redux API之combineReducers

    combineReducers(reducers) 随着应用变得复杂,需要对 reducer 函数 进行拆分,拆分后的每一块独立负责管理 state 的一部分. combineReducers 辅助函 ...

  3. Ubuntu下CodeBlocks更改调试终端

    Ubuntu下CodeBlocks更改调试终端   Ubuntu下的CodeBlocks自带的调试终端xterm不能进行复制粘贴操作,更换调试终端就可以解决了,就是把ubuntu下的gnome-ter ...

  4. Spring入门第十七课

    AOP编程 问题: 代码混乱: 越来越多的非业务需求(日志和验证等)加入后,原有的业务方法急剧膨胀,每个方法在处理核心逻辑的同事还必须兼顾其他多个关注点. 代码分散:以日志需求为例,只是为了满足这个单 ...

  5. Javascript中对文字编码的三个函数

    JavaScript中对文字编码主要有3个函数 escape,encodeURI, encodeURIComponent 相应3个解码函数 unescape, decodeURI, decodeURI ...

  6. 存储过程为参数NULL时的处理方法

    准备一些数据: SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[Goods]( ) NULL, ) NULL, ...

  7. Python:通过一个小案例深入理解IO多路复用

    通过一个小案例深入理解IO多路复用 假如我们现在有这样一个普通的需求,写一个简单的爬虫来爬取校花网的主页 import requests import time start = time.time() ...

  8. lightoj1010【规律】

    思路: 根据案例的规律其实已经猜的差不多了,answer=n*m/2; 有一条边是1的情况,也很好判断,answer=n*m; 就是有一条边是2的时候比较隐秘:是连续2*2一块可以填,然后2*2不填, ...

  9. 洛谷P1337 [JSOI2004]平衡点 / 吊打XXX(模拟退火)

    传送门 先坑着,联赛活着回来的话我就写(意思就是我绝对不会写了) //minamoto #include<cstdio> #include<cmath> #include< ...

  10. 洛谷P4003 无限之环(费用流)

    传送门 神仙题啊……不看题解我可能一年都不一定做得出来……FlashHu大佬太强啦 到底是得有怎样的脑回路才能一眼看去就是费用流啊…… 建好图之后套个板子就好了,那么我们着重来讨论一下怎么建图 首先, ...