The Syncfusion native Blazor components library offers 70+ UI and Data Viz web controls that are responsive and lightweight for building modern web apps.
.NET PDF framework is a high-performance and comprehensive library used to create, read, merge, split, secure, edit, view, and review PDF files in C#/VB.NET.
I was trying to bind two columns to the same field of my data source and got an error: "Item has already been added. Key in dictionary: 'XXXXAutoSizeMaxLength' Key being added: 'XXXXAutoSizeMaxLength'. XXXX being the name of the field.
RARajagopal Syncfusion Team September 4, 2007 01:38 AM UTC
Hi Stanley,
Thanks for your interest in Syncfusion Products.
The reason for this error is because you are trying to add a column that already exists in the TableDescriptor.Columns collection. That is, when you add the column to the TableDescriptor.Columns collection whose mapping name is same as the one in the columns collection. The default behvior in the latest version is to populate the column collection from the datasource and add any new entry to the end of the collection. When you bind two columns of same name to a field, this would result in this exception. Whereas, in older versions before you add anything to the collection, Columns.Clear() will be called internally. To avoid this error, you need to explicitly call the Clear() method before you add columns to the existing collection with same name.