找回密码
 立即注册

QQ登录

只需一步,快速开始

wotangjing

论坛元老

38

主题

97

帖子

7041

积分

论坛元老

积分
7041

活字格认证

[已处理] Spread

wotangjing
论坛元老   /  发表于:2013-11-1 10:37  /   查看:7014  /  回复:8
您好,
请问在Spread for Silverlight支持如下功能吗?


如果支持,还希望提供简单示例.不支持的会有开发计划吗?

非常感谢!

8 个回复

倒序浏览
iceman
社区贡献组   /  发表于:2013-11-1 12:26:00
沙发
回复 1楼wotangjing的帖子

1.Spread WPF-Silverlight 平台目前不支持内置编辑器。
2.数据验证需要自定义,在 EditEnd  事件中获取输入内容,手动校验。

  1.         private void GcSpreadSheet_EditEnd(object sender, GrapeCity.Windows.SpreadSheet.UI.EditCellEventArgs e)
  2.         {
  3.             string text = this.gcspreadsheet1.Sheets[0].Cells[e.Row, e.Column].Text;
  4.             //校验
  5.         }
复制代码

3.浮动提示功能目前无法支持。不过可以通过添加浮动对象来模拟:

  1. public class MyFloatingObject : GrapeCity.Windows.SpreadSheet.UI.CustomFloatingObject
  2.         {
  3.             public MyFloatingObject(string name, double x, double y, double width, double height)
  4.                 : base(name, x, y, width, height)
  5.             {
  6.             }

  7.             public override FrameworkElement Content
  8.             {
  9.                 get
  10.                 {
  11.                     Border border = new Border();

  12.                     StackPanel sp = new StackPanel();
  13.                     sp.Children.Add(new Label() { Content = "Label" });
  14.                     sp.Children.Add(new Button() { Content = "Button" });

  15.                     border.BorderThickness = new Thickness(1);
  16.                     border.BorderBrush = new SolidColorBrush(Colors.Black);
  17.                     border.Child = sp;
  18.                     return border;
  19.                 }
  20.             }
  21.         }

  22. //add instance of this floating object into worksheet
  23. MyFloatingObject mf = new MyFloatingObject("mf1", 10, 10, 200, 100);
  24. gcSpreadSheet1.ActiveSheet.FloatingObjects.Add(mf);
复制代码


目前还没有明确的开发计划
回复 使用道具 举报
wotangjing
论坛元老   /  发表于:2013-11-1 16:18:00
板凳
第一个问题有点疑问
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-11-1 17:35:00
地板
回复 3楼wotangjing的帖子

wotangjing 你好,
这个链接我打不开,请确认下是否正确。
回复 使用道具 举报
wotangjing
论坛元老   /  发表于:2013-11-4 09:16:00
5#
回复 4楼iceman的帖子

不可能啊,我这给的是官网Demo的链接http://www.componentone.com/Supe ... Silverlight/Demos/.就是WPF-Sliverlight下的标题为"1040 SPREADSHEET".请再次确认
回复 使用道具 举报
wotangjing
论坛元老   /  发表于:2013-11-4 10:22:00
6#
样本
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-11-4 16:16:00
7#
回复 6楼wotangjing的帖子

wotangjing 你好,
Demo 中是一种替代方案,我扩展了一下 Demo ,实现了如图所示功能:

Untitled.png

详细设置方法请参考 Demo:
10857_2.zip (1.71 MB, 下载次数: 487)
回复 使用道具 举报
wotangjing
论坛元老   /  发表于:2013-11-4 16:42:00
8#
谢谢,很到位.已经解决,可以关闭.
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-11-5 09:10:00
9#
回复 8楼wotangjing的帖子

不客气,有问题欢迎开新帖提问。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部