Hi,
in design mode I enlarge the width of certain columns. (it is bound to DataSet or IListSource)
In the InitializeComponent the designer writes:
UltraGridColumn ultraGridColumn2 = new Infragistics.Win.UltraWinGrid.UltraGridColumn("NAME"
);
ultraGridColumn2.Width = 250;
When the grid is shown it only has the default size of each column. AutofitStyle is set to none.
The strange thing is if I manually add :
ultraGrid1.Displaylayout.Bands[0].Colomns["NAME"].Width = ultraColumn2.Width
after:
((System.ComponentModel.ISupportInitialize)(this.ultraGrid1)).EndInit();
The column has the desired size.
Is this a bug? What can I do to stop this behavior? Why is EndInit changing my colum width?
regards
Stefan
This article should help.
HOWTO:How can I define columns in the grid at Design-time and bind them at run-time so that some fields of the data are excluded from the grid?