I have quite a large application and when new columns are added to the tables in the database, and consequently to the LinqToSql entities, they automatically just appear in my carefully laid out WinGrids and Combo's throughout the application.
Sorting this out is an unnecessary distraction from the task in hand and I was hoping that there is a way of locking down the WinGrid layout or setting it to an opt in for columns, so instead of visible they are hidden by default.
Hi Larry,
I think this is what you're looking for:
this.ultraGrid1.DisplayLayout.NewColumnLoadStyle = NewColumnLoadStyle.Hide;
There's also a similar property for bands:
this.ultraGrid1.DisplayLayout.NewBandLoadStyle = NewBandLoadStyle.Hide;
Excellent that works!
Here is how I implemented it;
Imports Infragistics.Win.UltraWinGrid
Public Class ipUltraWinGrid Inherits Infragistics.Win.UltraWinGrid.UltraGrid
Protected Overrides Sub OnCreateControl() Me.DisplayLayout.NewColumnLoadStyle = NewColumnLoadStyle.Hide
MyBase.OnCreateControl() End Sub
End Class
Many Thanks