急求在Asp.Net中SpreadSheet的用法?比如能数据的显示、修改、删除、增加、排序等操作。最好有中文的文档和相关范例!!!
解决方案 »
- 在GridView中嵌套下拉列表框的问题,急急急
- 这个页面是经过什么处理了?
- excel取出列的值,插入新的一列
- 请问VC论坛那中展开风格的制作!
- 如何给自定义控件自定义属性?
- datagrid与datalist中数据显示自动分行怎样实现!
- 但光标在textbox的时候,再按回车,如何触发一个服务器事件?
- 如何在打开页面的时候控制页面大小?
- 请问在ascx中将数据分页?
- 2个dataadpater一个dataset的问题
- datagrid的模板列中放入一个DropDownList,如何在后台DropDownList1.Items.Add(XXXX);??
- Session 总是2,3分钟就过期,怎么办?在线=
1, 表头数据的设定。
2, 表中数据的显示。
3, 表中按钮Image图片的显示。
4, 表中加入CheckBox列
5, 表中加入ComboBox列并能读取数据和选择功能。
6, 能修改数据和打印功能。
7, 输入任意行和列就可取得任意表格的数据。
8, 用鼠标双击任意列的表头就可对那一列为关键值排序。我简要说明一下spread的用法:
1, 在调用的.aspx页面开头注册:
"FarPoint.Web.Spread" Assembly="FarPoint.Web.SpreadJ, Version=2.0.1.0, Culture=neutral, PublicKeyToken=a5fa960294d899e7" %>
2,将控件加入到.aspx页面中:
<farpoint:fpspread id="FpSpread1" style="Z-INDEX: 101; LEFT: 160px; POSITION: absolute; TOP: 104px" runat="server" width="448px" height="223px">
<commandbar buttonshadowcolor="ControlDark" buttonfacecolor="Control" buttonhighlightcolor="ControlLightLight" backcolor="Control"></commandbar>
<sheets>
<farpoint:sheetview sheetname="Sheet1"></farpoint:sheetview>
</sheets>
</farpoint:fpspread>
3,页面对应的cs文件中加入对应的方法:
a, 向表中加入数据
//声明数据类对象
FarPoint.Web.Spread.Model.ISheetDataModel model;
//new一个M行N列的添充数据对象
model = new FarPoint.Web.Spread.Model.DefaultSheetDataModel(M, N);
//向i行j列的添充数据
model.SetValue(i, j, “String”);
//向i列的表头添加名称
FpSpread1.ActiveSheetView.ColumnHeader.Cells[0, i].Text = "数字";//鼠标双击任意列的表头就可对那一列为关键值排序
FpSpread1.ActiveSheetView.AllowSort = true;
FpSpread1.ActiveSheetView.SetColumnSortIndicator(0, FarPoint.Web.Spread.Model.SortIndicator.Descending);
//表中向i行j列加入ComboBox列并能读取数据和选择功能。FarPoint.Web.Spread.ComboBoxCellType cb=new FarPoint.Web.Spread.ComboBoxCellType(new string[] {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"}, new string[] {"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k"});
cb.ShowButton=true;
FpSpread1.Sheets[0].Cells[4, 2].CellType = cb;
//表中向k行第一列加入CheckBox列
FarPoint.Web.Spread.CheckBoxCellType ckb = new FarPoint.Web.Spread.CheckBoxCellType("Select", "Selected");
FpSpread1.Sheets[0].Cells[k, 0].CellType = ckb;
// 在spread的第一个Sheets中i行j列的取得数据对象
FpSpread1.Sheets[0].Cells[i, j].Text;
4,要在spread中显示各种控制图标:在spreadsort目录下有个目录fp_client设置为IIS的虚拟目录就可以了!我的努力就大体以上这些,希望大家分享与补充!谢谢