locked
Designer.cs error RRS feed

  • Question

  •  

    I am getting the following error on a build:

    Warning 1 The name "Description" is already in use by another component. K:\fms\admin.Designer.cs 2151 0 

     

    ok, so I check around in the Designer.cs file and see the following:

    this.descriptionDataGridViewTextBoxColumn1.Name = "Description"; // this is the only other line using "Description"

    this.descriptionDataGridViewTextBoxColumn.Name = "Description";  /// this is the line erroring out

     

    This stuff is all genereated by VS 2005 (C#)....so why the error? The textbox columns are different names used in different grids?

    Thx

    Wednesday, December 28, 2005 12:55 PM

Answers

  • Yep, Previously in CTP, DatagridColumns are inside each Datagridviews in designer file. However in RTM version, MS moved all DatagridColumns into the same level as DatagridViews, which brings an error when you have same column name in different datagridviews. All you need to do is to remove those error lines, regenerate the designer file and add those columns again with a different name.

    Besides, if your datagrid's data is binded from a datatable from database, for example, in a PERSON table, you have a column called "name". This "name" is a key word in designer file, which also causes errors. To avoid this problem is: either modify the table's column name in the database OR modify the datagrid's datasource property in property window. Hope this will help you.

     

    -XZ 

    Wednesday, December 28, 2005 5:19 PM

All replies

  • Are you using the RTM version instead of Beta2? If so, I could explain the problem.
    Wednesday, December 28, 2005 2:55 PM
  • yes, the original app was developed using July(?) CTP and I just installed the RTM and this shows up...
    Wednesday, December 28, 2005 4:29 PM
  • Yep, Previously in CTP, DatagridColumns are inside each Datagridviews in designer file. However in RTM version, MS moved all DatagridColumns into the same level as DatagridViews, which brings an error when you have same column name in different datagridviews. All you need to do is to remove those error lines, regenerate the designer file and add those columns again with a different name.

    Besides, if your datagrid's data is binded from a datatable from database, for example, in a PERSON table, you have a column called "name". This "name" is a key word in designer file, which also causes errors. To avoid this problem is: either modify the table's column name in the database OR modify the datagrid's datasource property in property window. Hope this will help you.

     

    -XZ 

    Wednesday, December 28, 2005 5:19 PM
  • well that sux...of course there are going to be multiple instances where tables can have the same col names....sheesh MS...

     

    thanks for your help...I already renamed the columns to "get around" the problem...looks like it is a permanent fix.

    jb

    Wednesday, December 28, 2005 7:40 PM
  • oh yeah...i had 2 of these errors...guess what the other col name was.......

    ..

    ..

    ..

    yeah "ID".....

    Wednesday, December 28, 2005 7:41 PM