找回密码
 立即注册

QQ登录

只需一步,快速开始

iceman
社区贡献组   /  发表于:2013-9-9 13:57:00
11#
回复 9楼tingche的帖子

tingche 你好,

设置显示 Combo 的属性为 ShowEditor。测试代码如下:

  1. protected void Page_Load(object sender, EventArgs e)
  2.         {
  3.             if (IsPostBack)
  4.             {
  5.                 return;
  6.             }

  7.             System.Data.DataSet data = new System.Data.DataSet("data");
  8.             data.Tables.Add("Table1");
  9.             data.Tables["table1"].Columns.Add("dataText");
  10.             data.Tables["table1"].Columns.Add("dataValue");
  11.             data.Tables["table1"].Rows.Add("WinSpread", "1");
  12.             data.Tables["table1"].Rows.Add("WebSpread", "2");
  13.             data.AcceptChanges();

  14.             FarPoint.Web.Spread.Extender.AjaxComboBoxCellType combo = new FarPoint.Web.Spread.Extender.AjaxComboBoxCellType();
  15.             //combo.ShowEditor = true;
  16.             combo.DataSource = data;
  17.             combo.DataMember = "table1";
  18.             combo.DataTextField = "dataText";
  19.             combo.DataValueField = "dataValue";
  20.             FpSpread1.Sheets[0].Cells[0, 0].CellType = combo;
  21.         }
复制代码
回复 使用道具 举报
tingche
银牌会员   /  发表于:2013-9-10 10:54:00
12#
错误提示:BC30560: 'FpSpread' is ambiguous in the namespace 'FarPoint.Web.Spread'.

错误位置:

<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="CommonSpread.ascx.vb" Inherits="Goe.SpecFinalization.SpecFinalizationPresentation.CommonSpread" %><%@ Register Assembly="AjaxControlToolkit"  Namespace="AjaxControlToolkit" TagPrefix="act" %>
<%@ Register assembly="FarPoint.Web.Spread, Version=7.0.4002.2010, Culture=neutral, PublicKeyToken=327c3516b1b18457" namespace="FarPoint.Web.Spread" tagprefix="FarPoint" %>
    <act:toolkitscriptmanager ID="ToolkitScriptManager1" runat="server">
</act:toolkitscriptmanager>
请问怎么处理
   
<FarPoint:FpSpread ID="fsCommon" runat="server" BorderColor="Black" oncreatebutton="FpSpread1_CreateButton"
    BorderStyle="Solid" BorderWidth="1px" Height="600px">
    <CommandBar BackColor="Control" ButtonFaceColor="Control"
            ButtonHighlightColor="ControlLightLight" ButtonShadowColor="ControlDark">
        </CommandBar>
        <Sheets>
            <FarPoint:SheetView SheetName="Sheet1">
            </FarPoint:SheetView>
        </Sheets>
            </FarPoint:FpSpread>
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-9-10 11:55:00
13#
回复 12楼tingche的帖子

从错误信息上看是无法决定从哪个 dll 中获取 Spread 对象。请查看你的 dll 引用是否正确。
附件是我的测试 Demo:

Spread_Web_AjaxComboBoxCellType.zip (867.21 KB, 下载次数: 304)
回复 使用道具 举报
tingche
银牌会员   /  发表于:2013-9-10 15:53:00
14#
添加 spread dll 引用后,生成的bin 如下,其中FarPoint.Web.SpreadJ.dll 是5.0 版本的dll,为什么会生成这个版本的dll,其他引用生成的都是7.0 版本的dll
dll.png
回复 使用道具 举报
iceman
社区贡献组   /  发表于:2013-9-10 18:24:00
15#
回复 14楼tingche的帖子

我的机器中也装了多个版本的 Spread ,但是拖拽后总是按照最高版本生成的 dll 信息。
你可以尝试以从工具箱中拖拽方式添加 Spread 7.0.

如果添加的 DLL 版本不对,需要更改的部分有:
1.当前 aspx 页面的 dll 版本。
2.license 文件中的版本信息。
3.WebConfig 中的 dll 版本。
4.引用中的 dll。

谢谢
回复 使用道具 举报
12
您需要登录后才可以回帖 登录 | 立即注册
返回顶部