FlexGrid Group如何设置 汇总项的描述?
FlexGrid Group如何设置 汇总项的描述?
您好,可以用这个API实现:
https://demo.grapecity.com.cn/wijmo/api/classes/wijmo_grid.flexgrid.html#groupheaderformat
没有显示分组的值? 代码如下,
您好,从您截图的代码片段,没发现具体问题的原因。
我这边编写了一个Demo,您参考一下:
import 'bootstrap.css';
import '@grapecity/wijmo.styles/wijmo.css';
import './styles.css';
import * as wjGrid from '@grapecity/wijmo.grid';
import * as wjGridGrouppanel from '@grapecity/wijmo.grid.grouppanel';
//
document.readyState === 'complete' ? init() : window.onload = init;
//
function init() {
//
// generate some random data
var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','), products = 'Phones,Computers,Cameras,Stereos'.split(','), data = [];
for (var i = 0; i < 200; i++) {
data.push({
id: i,
country: countries,
product: products,
downloads: Math.round(100 + Math.random() * 10000),
sales: Math.random() * 10000,
expenses: Math.random() * 5000,
});
}
//
// create group panel grid
var theGrid = new wjGrid.FlexGrid('#theGrid', {
itemsSource: data,
groupHeaderFormat: "自定义{name}自定义: 自定义<b>{value}自定义</b>自定义({count:n0} 自定义格式)自定义"
});
//
// create the group panel
var theGroupPanel = new wjGridGrouppanel.GroupPanel('#theGroupPanel', {
placeholder: 'Drag columns here to create groups',
grid: theGrid
});
}
https://demo.grapecity.com.cn/wijmo/demos/Grid/Grouping/GroupPanel/purejs
如果仍解决不了,请您打包一个能运行的Demo,上传附件。我帮您debug排查。
页:
[1]