找回密码
 立即注册

QQ登录

只需一步,快速开始

ferrarihx
注册会员   /  发表于:2015-8-26 14:06  /   查看:8291  /  回复:14
你好!
在你们的论坛上看到了,有关C1TrueDBGrid从1.1升级到2.0过程中的问题,调查了许久,想要向你请教一下。
在画面加载控件时,出现了如下的错误:
System.ArgumentException: Item has already been added. Key in dictionary: 'Insert Column'  Key being added: 'Insert Column'
不知道你是否知道?
谢谢!

14 个回复

倒序浏览
gw0506
超级版主   /  发表于:2015-8-26 14:54:00
沙发
你是什么技术平台的产品?ActiveX吗? WinFroms下的C1TrueDBGrid没有  1.1  2.0这样的版本号。都是比如2015v2也就是20152.××
单凭这一句话没法判断原因。这句话只能知道某个集合的项目被重复添加了。
回复 使用道具 举报
ferrarihx
注册会员   /  发表于:2015-8-26 15:06:00
板凳
您好!
谢谢您的回复。
我是在vs2008环境下,通过改变refenrence来改变C1TrueDBGrid的。
WinFroms下的C1TrueDBGrid 1.3.20044.41201  升级到 2.0.20082.61142时,出现如下的问题。
我的Form1.Designer.cs代码如下所示:
在红色部分出错了。
namespace WindowsFormsApplication1
{
    partial class Form1
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;

        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing &amp;&amp; (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }

        #region Windows Form Designer generated code

        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
          this.c1TrueDBGrid1 = new C1.Win.C1TrueDBGrid.C1TrueDBGrid();         ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).BeginInit();
            this.SuspendLayout();
            //
            // c1TrueDBGrid1
            //
            this.c1TrueDBGrid1.GroupByCaption = "列でグループ化するには、ここに列ヘッダをドラッグします。";
            this.c1TrueDBGrid1.Images.Add(((System.Drawing.Image)(resources.GetObject("c1TrueDBGrid1.Images"))));
            this.c1TrueDBGrid1.Location = new System.Drawing.Point(12, 57);
            this.c1TrueDBGrid1.Name = "c1TrueDBGrid1";
            this.c1TrueDBGrid1.PreviewInfo.Caption = "印刷プレビューウィンドウ";
            this.c1TrueDBGrid1.PreviewInfo.Location = new System.Drawing.Point(0, 0);
            this.c1TrueDBGrid1.PreviewInfo.Size = new System.Drawing.Size(0, 0);
            this.c1TrueDBGrid1.PreviewInfo.ZoomFactor = 75;
            this.c1TrueDBGrid1.PrintInfo.PageSettings = ((System.Drawing.Printing.PageSettings)(resources.GetObject("c1TrueDBGrid1.PrintInfo.PageSettings")));
            this.c1TrueDBGrid1.Size = new System.Drawing.Size(240, 150);
            this.c1TrueDBGrid1.TabIndex = 0;
            this.c1TrueDBGrid1.Text = "c1TrueDBGrid1";
            this.c1TrueDBGrid1.PropBag = resources.GetString("c1TrueDBGrid1.PropBag");
            //
            // Form1
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(292, 273);
            this.Controls.Add(this.c1TrueDBGrid1);
            this.Name = "Form1";
            this.Text = "Form1";
            ((System.ComponentModel.ISupportInitialize)(this.c1TrueDBGrid1)).EndInit();
            this.ResumeLayout(false);

        }

        #endregion

        private C1.Win.C1TrueDBGrid.C1TrueDBGrid c1TrueDBGrid1;
    }
}
回复 使用道具 举报
gw0506
超级版主   /  发表于:2015-8-26 15:11:00
地板
这一句语法没有任何问题,没法查。
你要不就把工程发过来,如果方便的话。或者重新新建个工程,尝试升级,看有啥问题。如果给我发demo的话,记得要把那些reference  copytolocal  否者我这边跑不起来。因为你这是2004年的日文版产品,根本找不到了~
回复 使用道具 举报
ferrarihx
注册会员   /  发表于:2015-8-26 15:20:00
5#

新建工程文件

谢谢您这么迅速地回复与解答。
现在把工程文件发给你,
你试着跑一下,
谢谢!

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
gw0506
超级版主   /  发表于:2015-8-26 15:41:00
6#
这个demo我这里运行一切正常。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
ferrarihx
注册会员   /  发表于:2015-8-26 15:48:00
7#
这个demo我这里运行一切正常。


gw0506 发表于 2015-8-26 15:41:00


谢谢你的回复。

我是在WINXP中通过VS2008编译器来制作的,
想问问你那边的编译器以及运行环境是什么?
能否把你重新编译过后的bin里面文件发给我,
谢谢你。
回复 使用道具 举报
gw0506
超级版主   /  发表于:2015-8-26 16:41:00
8#
这种问题跟VS和系统应该没有关系。
我把bin给你了也没用吧,里面就是exe和dll。

不如你把你的报错界面发来看看。
回复 使用道具 举报
ferrarihx
注册会员   /  发表于:2015-8-26 16:49:00
9#
这种问题跟VS和系统应该没有关系。
我把bin给你了也没用吧,里面就是exe和dll。

不如你把你的报错界面发来看看。
gw0506 发表于 2015-8-26 16:41:00


谢谢你的回复。

如果你那边的VS版本比我这边高,
应该会提示工程升级之类,
我想试试看升级并编译后的文件在我这边是否可以正常运行?

还有就是运行时的错误发给你了,
是在开始运行的时候报错的,
但是如果点击继续运行也会显示画面。
谢谢你。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 使用道具 举报
ferrarihx
注册会员   /  发表于:2015-8-26 17:05:00
10#
回复 9楼ferrarihx的帖子

如果可以的话,我也想参照你的环境来构筑一下我这边的环境,
所以想要知道你那边的OS以及VS版本,谢谢你。
回复 使用道具 举报
12下一页
您需要登录后才可以回帖 登录 | 立即注册
返回顶部