回复 7楼青格儿的帖子
可以通过 AutoCompleteCellType 下的 OnClientItemSelected 属性来调用前台方法更改单元格文本,参考代码:
C#
- FarPoint.Web.Spread.Extender.AutoCompleteCellType ac = new FarPoint.Web.Spread.Extender.AutoCompleteCellType();
- ac.CompletionInterval = 1;
- ac.CompletionSetCount = 5;
- ac.DelimiterCharacters = ";, :";
- AjaxControlToolkit.TextBoxWatermarkExtender twe = new AjaxControlToolkit.TextBoxWatermarkExtender();
- twe.WatermarkText = "输入'S'测试...";
- ac.Extenders.Add(twe);
- ac.FirstRowSelected = true;
- ac.ServicePath = "WebService1.asmx";
- ac.ServiceMethod = "GetAllNames";
- ac.MinimumPrefixLength = 1;
- ac.EnableCaching = true;
- ac.ShowEditor = true;
- ac.OnClientItemSelected = "selectchanged";
- FpSpread1.ActiveSheetView.Cells[0, 0].CellType = ac;
复制代码
js
- function selectchanged() {
- alert("celltextchanged");
- }
复制代码 |