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

QQ登录

只需一步,快速开始

村里人

初级会员

7

主题

11

帖子

258

积分

初级会员

积分
258
村里人
初级会员   /  发表于:2021-1-15 18:29  /   查看:2434  /  回复:3
1金币
flexGrid拖拽列标题到分组面板上,是否还可以按照拖拽的列来排序?如下图,我拖拽了3列,是否可以按照这3列同时来排序。(既:先按照订单号排序,再按照商业代号排序,再按照箱号排序),是否可以?


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

3 个回复

倒序浏览
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-1-18 09:29:00
沙发
您好,支持多列排序,请参考示例:
https://www.grapecity.com/wijmo/ ... g/GroupPanel/purejs

用以下代码替换app.js即可:
  1. import 'bootstrap.css';
  2. import '@grapecity/wijmo.styles/wijmo.css';
  3. import './styles.css';
  4. //
  5. import '@grapecity/wijmo.touch'; // support drag/drop on touch devices
  6. import * as wjGrid from '@grapecity/wijmo.grid';
  7. import { AllowSorting } from '@grapecity/wijmo.grid';
  8. import * as wjGridGrouppanel from '@grapecity/wijmo.grid.grouppanel';
  9. //
  10. document.readyState === 'complete' ? init() : window.onload = init;
  11. //
  12. function init() {
  13.     //
  14.     // generate some random data
  15.     var countries = 'US,Germany,UK,Japan,Italy,Greece'.split(','), products = 'Phones,Computers,Cameras,Stereos'.split(','), data = [];
  16.     for (var i = 0; i < 200; i++) {
  17.         data.push({
  18.             id: i,
  19.             country: countries[i % countries.length],
  20.             product: products[i % products.length],
  21.             downloads: Math.round(100 + Math.random() * 10000),
  22.             sales: Math.random() * 10000,
  23.             expenses: Math.random() * 5000,
  24.         });
  25.     }
  26.     //
  27.     // create group panel grid
  28.     var theGrid = new wjGrid.FlexGrid('#theGrid', {
  29.         itemsSource: data,
  30.         allowSorting: AllowSorting.MultiColumn
  31.     });
  32.     //
  33.     // create the group panel
  34.     var theGroupPanel = new wjGridGrouppanel.GroupPanel('#theGroupPanel', {
  35.         placeholder: 'Drag columns here to create groups',
  36.         grid: theGrid
  37.     });
  38. }
复制代码
回复 使用道具 举报
村里人
初级会员   /  发表于:2021-1-18 17:12:13
板凳



没有拖拽列标题到分组时是可以多列排序的,但是拖到分组面板时就没法多列排序了?

本帖子中包含更多资源

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

x
回复 使用道具 举报
KevinChen讲师达人认证 悬赏达人认证 SpreadJS 开发认证
论坛元老   /  发表于:2021-1-18 17:46:50
地板
你好,经测试,可以支持分组面板中多列排序,如图:


请确保您引用的版本是最新版本,npm地址:
https://www.npmjs.com/~grapecity

本帖子中包含更多资源

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

x
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部