请选择 进入手机版 | 继续访问电脑版
 找回密码
 立即注册

QQ登录

只需一步,快速开始

Fishborne
金牌服务用户   /  发表于:2020-11-10 12:52  /   查看:2427  /  回复:3

FlexGrid Group如何设置 汇总项的描述?

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x

3 个回复

倒序浏览
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2020-11-10 15:06:26
沙发
您好,可以用这个API实现:
https://demo.grapecity.com.cn/wi ... l#groupheaderformat
回复 使用道具 举报
Fishborne
金牌服务用户   /  发表于:2020-11-11 11:46:39
板凳

没有显示分组的值? 代码如下,

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2020-11-11 15:52:37
地板
您好,从您截图的代码片段,没发现具体问题的原因。


我这边编写了一个Demo,您参考一下:

  1. import 'bootstrap.css';
  2. import '@grapecity/wijmo.styles/wijmo.css';
  3. import './styles.css';
  4. import * as wjGrid from '@grapecity/wijmo.grid';
  5. import * as wjGridGrouppanel from '@grapecity/wijmo.grid.grouppanel';
  6. //
  7. document.readyState === 'complete' ? init() : window.onload = init;
  8. //
  9. function init() {
  10.     //
  11.     // generate some random data
  12.     var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','), products = 'Phones,Computers,Cameras,Stereos'.split(','), data = [];
  13.     for (var i = 0; i < 200; i++) {
  14.         data.push({
  15.             id: i,
  16.             country: countries[i % countries.length],
  17.             product: products[i % products.length],
  18.             downloads: Math.round(100 + Math.random() * 10000),
  19.             sales: Math.random() * 10000,
  20.             expenses: Math.random() * 5000,
  21.         });
  22.     }
  23.     //
  24.     // create group panel grid
  25.     var theGrid = new wjGrid.FlexGrid('#theGrid', {
  26.         itemsSource: data,
  27.         groupHeaderFormat: "自定义{name}自定义: 自定义<b>{value}自定义</b>自定义({count:n0} 自定义格式)自定义"
  28.     });
  29.     //
  30.     // create the group panel
  31.     var theGroupPanel = new wjGridGrouppanel.GroupPanel('#theGroupPanel', {
  32.         placeholder: 'Drag columns here to create groups',
  33.         grid: theGrid
  34.     });
  35. }
复制代码


https://demo.grapecity.com.cn/wi ... g/GroupPanel/purejs

如果仍解决不了,请您打包一个能运行的Demo,上传附件。我帮您debug排查。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部