jQuery-Based BCGrid Table Plugin

Add-ons
2026-07-26 04:04 1 次浏览 • 0 次下载 1.2KB
jQuery-Based BCGrid Table Plugin

Last Updated: 2019/8/22 9:41:45 PM

Changelog:Released the latest stable version v1.2.2.

1. Added the getSelectedRows method.

2. Added the serial number column type "serial".

3. Fixed several bugs discovered during implementation in real-world projects.


Last Updated: 2019-06-19 09:36:10

Changelog:

1. Added row merging support (rowspan).

2. Added variable column width support (based on colResizable).

3. Fixed several bugs.


Last Updated: 2019-05-07 09:36:39

Changelog:This is the latest stable version. Fixed several bugs, added some settings, and introduced new features.


Last Updated: 2018/12/17 2:41:27 PM

Changelog:Added row details support (currently incompatible with Tree mode). Added double-click event support. Added PHP/C#/Java demos. Adjusted the tree grid (currently incompatible with row details). Added row detail expand/collapse events. Added editing support for text boxes, dropdowns, and switches. Added other demos and more.


Last Updated: 2018/8/22 3:44:22 PM

Changelog:Fixed several bugs in Tree mode.


BCGrid

jQuery Grid Plugin. Flexible and convenient!

How to Use:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
var grid=BCGrid.create("#table",{
columns: [
{id: 'id', name: 'id', display: 'ID', align: 'center', hide: true},
{id: 'name', name: 'name', display: 'Name'},
{
name: 'gender', display: 'Gender', render: function (item, index) {
if (item.gender == 1) {
return "Boy";
}
if (item.gender == 2) {
return "Girl";
}
}
},
{name: 'age', display: 'Age', format: '{value}Years', enableSort: true},
{name: 'email', display: 'Email', enableSort: true},
{name: 'mobile', display: 'Mobile'},
{name: 'sign', display: 'Sign',maxLength:10},
{name: 'time', display: 'Time',type:'dateTime',format:'MM/dd yyyy hh:mm:ss'}
],
title:'BC Grid',
showTitle:true,
showCheckbox: true,
showSerialNum: true,
url: 'handler/data.php'
});

Options:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
id: '',
width: '', // Width value
height: '', // Width value
enabledCsrf: false,
csrfName: '_csrf',
lang: 'en',
csrf: '',
url: '', //ajax url
data: {}, // Initial data
localData: [],
autoLoadData: true,
showLoading: true, // Whether to display the loading status indicator
loadingTip: 'Loading',// Loading message
loadingStyle: 3,// Loading style
enablePager: true, // Whether to enable pagination
page: 1, // Default current page
pageSize: 40, // Default number of results per page; all means all results
pageSizeOptions: [10, 20, 30, 40, 50, 100], // Configurable number of results per page; supports all
pagerOption: {
showFirst: true,
showLast: true,
showPrev: true, //
showNext: true, //
showWhenever: true, // Whether to display pagination permanently
showPageSizeOpt: true,
firstText: 'First', // First page
lastText: 'Last', // Last page
prevText: 'Previous', // Previous page
nextText: 'Next', // Next page
ellipseText: "...",
pageInfoTpl:'Page {currentPage} of {pageCount},{pageSize} records per page,total {recordCount} records'
},
sortName: "", // Sort column field
sortOrder: "", // Sort direction
params: [], // Parameters submitted to the server
columns: [], // Data source
dataSource: 'server', // Data source: local or server. Local reads p.data and requires no additional configuration. The source is determined by whether data or url is configured.
showCheckbox: false, // Whether to display checkboxes
showSerialNum: true, // Whether to display row numbers
showBorder: true, // Whether to display borders
showStripe: true,// Whether to display alternating row stripes
showHover: true,// Whether to enable hover effects
showHead: true,
showTitle: false,
title: "",
noDataText: '<div class="center">No records available</div>',
dateFormat: 'yyyy-MM-dd hh:mm:ss', // Default date display format
wrapCssClass: '', // Class name
cssClass: 'bc-table', // Class name
rows: 'rows', // Data source field name
total: 'total', // Data source record count field name
pageParamName: 'page', // Page index parameter name (submitted to the server)
pageSizeParamName: 'pagesize', // Page record count parameter name (submitted to the server)
sortNameParamName: 'sortname', // Page sort column name (submitted to the server)
sortOrderParamName: 'sortorder', // Page sort direction (submitted to the server)
pagerElement: null, // Pagination container
enableSelectRow: true, // Whether rows can be selected
enableMultiSelectRow: false,// Whether multiple row selection is allowed
onCheckClick: null, // Selection event (checkbox)
onCheckAllClick: null, // Selection click data (select all/deselect all)
onError: null, // Error event
onCompleted: null, // Callback function after loading
onLoadData: null, // Event before loading data
onLoadedData: null, // Event after data loading
onSelectedRow: null, // Row selection event
onRowClick: null, // Row selection event
onTreeExpandOrCollapse: null,// Tree expand/collapse event
tree: null
星河码客

发现和分享优质开源项目,传承互联网精神,为开发者服务。

关于本站

联系我们

微信/广告合作:ITcloub (备注星河码客)

免责声明:本站资源版权归原作者所有,仅供学习与交流。如有侵权,请通过「关于我们 - 侵权投诉」联系删除。

Powered by Nuxt · Deployed on Cloudflare