Hi,
i have this class :
Public Class DivaObjectDesign Inherits DivaObject Private _progressBar As ProgressBar Public Sub New() Me.InitializeProgressBar() End Sub Public Property ProgressBar() As ProgressBar Get Return _progressBar End Get Set (ByVal value As ProgressBar) _progressBar = value End Set End Property Private Sub InitializeProgressBar() Me.ProgressBar = New ProgressBar Me.ProgressBar.Minimum = 0 Me.ProgressBar.Maximum = 100 Me.ProgressBar.Value = 50 End Sub End Class
when i bind to the grid, it works but i don't have the progressbar, i have "system.windows.forms.progressbar"
i suppose that i have to inherits from ultragridcell or something like that?
is there a way to avoid telling the grid the type of column, i wish to do this transparently from business objects
Thank you,
Kind Regards
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Bands[0].Columns["My column"].EditorControl = this.ultraProgressBar1; e.Layout.Bands[0].Columns["My column"].MinValue = 0; e.Layout.Bands[0].Columns["My column"].MaxValue = 100; }
Sorry if wasn't clear :(
can you do what you told me programmatically in the "initializelayout"?
in fact i tried to create objects that represents the grid itselfs (the grid is aware of binded columns)
but i agree that i have to do some fine graphical adjustments in the InitializeLayout...
Regards
I'm afraid you lost me. I'm not sure what you are asking.
To make a column in the grid display as a ProgressBar, then you need to set the EditorControl/EditorComponent on the grid column to an UltraProgressBar control. You will also need to set the MinValue and MaxValue on the column to define the progress bar's range.