相关阅读:
Bootstrap Table使用整理(一) https://www.jb51.net/article/115789.htm
Bootstrap Table使用整理(三) https://www.jb51.net/article/115795.htm
Bootstrap Table使用整理(四)之工具栏 https://www.jb51.net/article/115798.htm
Bootstrap Table使用整理(五)之分页组合查询 https://www.jb51.net/article/115785.htm
一、行样式修改
二、单元格样式定义,对齐方式定义
$('#table1').bootstrapTable({
columns: [
{
field: 'sno', title: '学生编号',
align: 'center',
halign:'right',
cellStyle: function (value, row, index) {
//当前列,奇数单元格显示绿色
if (index%2==0)
return {
classes: 'success'
};
return {};
}
},
{ field: 'sname', title: '学生姓名' },
{ field: 'ssex', title: '性别' },
{ field: 'sbirthday', title: '生日' },
{ field: 'class', title: '课程编号' },
],
url:'@Url.Action("GetStudent","DataOne")'
});
三、排序列定义
$('#table1').bootstrapTable({
columns: [
{ field: 'sno', title: '学生编号', sortable: true },
{ field: 'sname', title: '学生姓名', sortable: true},
{ field: 'ssex', title: '性别', sortable: true },
{ field: 'sbirthday', title: '生日', sortable: true},
{ field: 'class', title: '课程编号', sortable: true},
],
url:'@Url.Action("GetStudent","DataOne")'
});
以上所述是小编给大家介绍的Bootstrap Table使用整理(二),希望对大家有所帮助,如果大家有任何疑问请给我留言,小编会及时回复大家的。在此也非常感谢大家对考高分网网站的支持!



