找回密码
 立即注册

QQ登录

只需一步,快速开始

hbzck08

注册会员

6

主题

15

帖子

45

积分

注册会员

积分
45

活字格认证

最新发帖
hbzck08
注册会员   /  发表于:2015-4-21 10:54  /   查看:4438  /  回复:2
我想对第1列,3列,6列进行排序,直接代码排序,不用出界面倒三角,请高手指点

2 个回复

倒序浏览
hbzck08
注册会员   /  发表于:2015-4-21 14:21:00
沙发
FarPoint.Win.Spread.SortInfo[] sorter = new FarPoint.Win.Spread.SortInfo[3];
                sorter[0] = new FarPoint.Win.Spread.SortInfo(0, true);
                sorter[1] = new FarPoint.Win.Spread.SortInfo(2, true);
                sorter[2] = new FarPoint.Win.Spread.SortInfo(6, true);
                fpMain.ActiveSheet.SortRows(0, fpMain.ActiveSheet.RowCount, sorter);
回复 使用道具 举报
Alice
社区贡献组   /  发表于:2015-4-21 14:40:00
板凳
回复 1楼hbzck08的帖子

谢谢反馈。

可以使用SortInfo方法。
文档上有方法的详细描述,产品文档路径:
索引:FarPoint.Win.Spread Assembly > FarPoint.Win.Spread Namespace > SheetView Class > SortColumns Method : SortColumns(Int32,Int32,SortInfo[]) Method

Spread WinForm
文档地址:
32位系统:C:\Program Files\ComponentOne\Spread Studio 8\Docs\Windows Forms
64位系统:C:\Program Files (x86)\ComponentOne\Spread Studio 8\Docs\Windows Forms
文档名称:FarPoint.Win.Spread.8.0.chm
请点击评分,对我的服务做出评价!  5分为非常满意!

葡萄城控件服务团队

官方网站: http://www.gcpowertools.com.cn
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部