I migrated a win-application from IG 2008 vol 1 to IG 2008 vol 2. After compiling and start I get a NullReferenceException on initializing a new Form.
In the form is a UltraGrid with an UltraDataSource (dsMain) that will be filled manualy.
The Exception is thrown in the InitializeComponent method of my form.
private void InitializeComponent(){
// ...
((System.ComponentModel.ISupportInitialize)(this.dsMain)).EndInit();
}
private Infragistics.Win.UltraWinDataSource.UltraDataSource dsMain;
The StackTrace is:
bei Infragistics.Win.UltraWinDataSource.UltraDataSource.UDSBindingSource.SetBindingSources(UltraDataBand band, Dictionary`2 bindingSources) bei Infragistics.Win.UltraWinDataSource.UltraDataSource.UDSBindingSource.InternalSetBand(UltraDataBand band, Dictionary`2 oldBindingSources) bei Infragistics.Win.UltraWinDataSource.UltraDataSource.OnDeserializationComplete(UltraDataRowsCollection deserializedRows, Dictionary`2 oldBindingSources) bei Infragistics.Win.UltraWinDataSource.UltraDataSource.System.ComponentModel.ISupportInitialize.EndInit() bei MyApp.MyForm.InitializeComponent() in D:\MyApp\MyForm.Designer.cs:Zeile 360.
I hope someone can help me!
Michael
Hi Michael,
Does this happen every time? Can you duplicate this in a small sample project? If so, you should Submit an incident to Infragistics Developer Support so they can check it out. If this worked in the previous version, it seems like it's probably a bug.
Hi Mike,
1) Yes it does every time, when I start my small demo (see attached archive IGDemo.zip).
2) Unfortunately I found an other bad thing about the new Version of IG.
The visual studio designer add every time when I modify something in the grid (like the size of a column) some lines of code to the designer file (MyForm.Designer.cs) that can't be compiled:
// // gridMain // this.gridMain.DataSource = this.bsMain; appearance2.BackColor = System.Drawing.Color.White; appearance2.BorderColor = System.Drawing.Color.SlateGray; ApplyResources(appearance2.FontData, "appearance2.FontData"); ApplyResources(appearance2, "appearance2");
Is this an bug?