找回密码
 立即注册

QQ登录

只需一步,快速开始

a1274918722

论坛元老

12

主题

31

帖子

7922

积分

论坛元老

积分
7922

活字格认证

a1274918722
论坛元老   /  发表于:2013-4-11 01:23  /   查看:5902  /  回复:5
类似于excel的筛选

5 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2013-4-11 14:49:00
沙发
回复 1楼a1274918722的帖子

请使用以下代码测试:

  1.         protected void Page_Load(object sender, EventArgs e)
  2.         {
  3.             if (IsPostBack)
  4.             {
  5.                 return;
  6.             }
  7.             FpSpread1.Sheets[0].Cells[0, 2].Text = "test";

  8.             FarPoint.Web.Spread.NamedStyle instyle = new FarPoint.Web.Spread.NamedStyle();

  9.             FarPoint.Web.Spread.NamedStyle outstyle = new FarPoint.Web.Spread.NamedStyle();


  10.             FarPoint.Web.Spread.FilterColumnDefinition fcd = new FarPoint.Web.Spread.FilterColumnDefinition(1, FarPoint.Web.Spread.FilterListBehavior.SortByMostOccurrences | FarPoint.Web.Spread.FilterListBehavior.Default);

  11.             FarPoint.Web.Spread.FilterColumnDefinition fcd1 = new FarPoint.Web.Spread.FilterColumnDefinition(2);

  12.             FarPoint.Web.Spread.FilterColumnDefinition fcd2 = new FarPoint.Web.Spread.FilterColumnDefinition();

  13.             FarPoint.Web.Spread.StyleRowFilter sf = new FarPoint.Web.Spread.StyleRowFilter(FpSpread1.Sheets[0], instyle, outstyle);

  14.             sf.AddColumn(fcd);

  15.             sf.AddColumn(fcd1);

  16.             sf.AddColumn(fcd2);

  17.             FpSpread1.Sheets[0].RowFilter = sf;

  18.             FpSpread1.Sheets[0].AutoFilterColumn(0, "test");

  19.         }
复制代码
回复 使用道具 举报
a1274918722
论坛元老   /  发表于:2013-4-15 09:24:00
板凳
回复 2楼iceman的帖子


问题:
1.列名被遮住看不见。
2.我运行上述代码不能实现筛选的功能
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-4-15 16:54:00
地板
回复 3楼a1274918722的帖子

a1274918722 你好,
可以参考随机安装 Demo,路径如下:
64位机器:C:\Program Files (x86)\GrapeCity\Spread .NET 6\ASP.NET\v6.0.3505\Samples\Cs\spWebProductTourCS\filter.aspx
32位机器:C:\Program Files\GrapeCity\Spread .NET 6\ASP.NET\v6.0.3505\Samples\Cs\spWebProductTourCS\filter.aspx

Spread .NET 7 近期即将发布,支持传统过滤样式及Excel 过滤样式,敬请关注。
回复 使用道具 举报
a1274918722
论坛元老   /  发表于:2013-4-16 15:21:00
5#
回复 4楼iceman的帖子

近期的话 大概是在什么时候??
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-4-16 19:53:00
6#
回复 5楼a1274918722的帖子

你好,我们产品发布目前还没有拿到确切时间表。
最晚在五月底发布。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部