bootstrap-table学习
参考学习 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学习的更多相关文章
- .Net MVC+bootstrap Table学习
一.效果展示 二.使用方法 1).相关css和js的引用 <link href="~/Themes/Bootstrap/css/bootstrap.css" rel=&quo ...
- bootstrap table 学习记录
效果: html代码: <!-- 工具容器 --> <div id="toolbar" class="btn-group"> <b ...
- Bootstrap Table使用方法详解
http://www.jb51.net/article/89573.htm bootstrap-table使用总结 bootstrap-table是在bootstrap-table的基础上写出来的,专 ...
- 后台系统组件:一丶bootstrap table
http://www.cnblogs.com/landeanfen/p/4976838.html (bootstrap table) http://www.cnblogs.com/landeanfen ...
- 轻量级表格插件Bootstrap Table。拥有强大的支持固定表头、单/复选、排序、分页、搜索及自定义表头等功能。
Bootstrap Table是轻量级的和功能丰富的以表格的形式显示的数据,支持单选,复选框,排序,分页,显示/隐藏列,固定标题滚动表,响应式设计,Ajax加载JSON数据,点击排序的列,卡片视图等. ...
- ABP+AdminLTE+Bootstrap Table权限管理系统一期
学而时习之,不亦说乎,温顾温知新,可以为师矣. 这也是算是一种学习的方法和态度吧,经常去学习和总结,在博客园看了很多大神的文章,写下一点对于ABP(ABP是“ASP.NET Boilerplat ...
- ABP+AdminLTE+Bootstrap Table权限管理系统第五节--WBEAPI及SwaggerUI
一,Web API ABP的动态WebApi实现了直接对服务层的调用(其实病没有跨过ApiController,只是将ApiController公共化,对于这一点的处理类似于MVC,对服务端的 调用没 ...
- ABP module-zero +AdminLTE+Bootstrap Table+jQuery权限管理系统第十二节--小结,Bootstrap Table之角色管理
返回总目录:ABP+AdminLTE+Bootstrap Table权限管理系统一期 很多人说ABP不适合高并发大型,有一定的道理,但是我觉得还是可以的,就看架构师的能力了,哈哈,我之前公司就是ABP ...
- ABP module-zero +AdminLTE+Bootstrap Table+jQuery权限管理系统第十六节--SignalR与ABP框架Abp.Web.SignalR及扩展
SignalR简介 SignalR是什么? ASP.NET SignalR 是为 ASP.NET 开发人员提供的一个库,可以简化开发人员将实时 Web 功能添加到应用程序的过程.实时 Web 功能是指 ...
- 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- ...
随机推荐
- linux命令:gzip命令
减少文件大小有两个明显的好处,一是可以减少存储空间,二是通过网络传输文件时,可以减少传输的时间.gzip是在Linux系统中经常使用的一个对文件进行压缩和解压缩的命令,既方便又好用.gzip不仅可以用 ...
- oracle练习题 实验一
实验一 练习1.请查询表DEPT中所有部门的情况. select * from dept; 练习2.查询表DEPT中的部门号.部门名称两个字段的所有信息. select deptno,dname fr ...
- textarea的style="resize:none;"
<textarea class="form-control" id="gryj" rows="3" maxlength="3 ...
- Gym - 101142J Java2016 (构造)
题意:给定一个数字,让你构造成一些表达式,最后结果是该数字的概率要大于50%. 析:我们可以把一个数分解是2的多少次幂,然后加起来就好. 代码如下: #pragma comment(linker, & ...
- POJ - 2955 Brackets括号匹配(区间dp)
Brackets We give the following inductive definition of a “regular brackets” sequence: the empty sequ ...
- swfupload原理总结
1.引入js(js内动态添加上传的文件并提交表单) 2.后台处理(将图片保存) 3.调用另一个js修改前台图片的地址(改为新的图片地址)
- 使用ASP.NET Core实现Docker的HealthCheck指令
写在前面 HealthCheck 不仅是对应用程序内运行情况.数据流通情况进行检查, 还包括应用程序对外部服务或依赖资源的健康检查. 健康检查通常是以暴露应用程序的HTTP端点的形式 实施,可用于配 ...
- 用Python分析国民生产总值
今天学习Python的matplotlib,书上的一道例题感觉写的很好(黄红梅的Python数据分析与应用),就是 利用matplotlib的各种图来对2000-2017年季度生产总值进行分析,这道题 ...
- node学习(2)-路由读取图片
通常我们开发项目的时候都要用到图片,那么nodejs是如何读取图片的呢? 我们来看一下,因为一个网页中图片的数量是不确定的,而我们不能每一张图片都去写它的src路径,这时候最好的方法就是写一个专门读取 ...
- 微信小程序-工具无法加载本地模拟开发服务的解决办法
微信小程序开发工具出现如下问题: 因为网络代理软件或者 VPN 影响,工具无法加载本地模拟开发服务 请尝试以下任一解决方案1.关闭相关网络代理软件,重新编译成功后,再启动相关网络代理软件: 2.配置 ...