回复 1楼chcchb的帖子
你好,
1.末尾以 '...' 形式显示,可以通过 TextCellType 实现,代码如下:
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.TextCellType txtype = new FarPoint.Web.Spread.TextCellType();
- txtype.ShowEllipsis = true;
- this.FpSpread1.Sheets[0].Cells[1, 1].CellType = txtype;
- this.FpSpread1.Sheets[0].Cells[1, 1].Text = "testtesttesttesttest";
- this.FpSpread1.Sheets[0].Cells[1, 1].Note = "testtesttesttesttest";
复制代码
2.分组后 note 属性失效,我通过以下代码没有重现问题,
- protected void Page_Load(object sender, EventArgs e)
- {
- if (IsPostBack)
- {
- return;
- }
- FarPoint.Web.Spread.TextCellType txtype = new FarPoint.Web.Spread.TextCellType();
- txtype.ShowEllipsis = true;
- this.FpSpread1.Sheets[0].Cells[1, 1].CellType = txtype;
- this.FpSpread1.Sheets[0].Cells[1, 1].Text = "testtesttesttesttest";
- this.FpSpread1.Sheets[0].Cells[1, 1].Note = "testtesttesttesttest";
- FpSpread1.Sheets[0].GroupBarVisible = true;
- //设置 group 信息
- FarPoint.Web.Spread.SheetView sv = this.FpSpread1.ActiveSheetView;
- sv.AllowGroup = true;
- GroupDataModel gdm = new GroupDataModel(sv.DataModel);
- sv.DataModel = gdm;
- FarPoint.Web.Spread.SortInfo[] sort = new FarPoint.Web.Spread.SortInfo[1];
- //设置分组列和排序方式
- sort[0] = new FarPoint.Web.Spread.SortInfo(1, true);
- gdm.Group(sort);
- FarPoint.Web.Spread.Model.Group group = new Group(gdm, (FarPoint.Web.Spread.Model.Group)gdm.Groups[0], 0, false);
- GroupFooter groupfooter = new GroupFooter(group);
- FpSpread1.Sheets[0].GroupFooterVisible = true;
- }
复制代码
效果图:
|