Hello,
I'm having two particular problems with the WinGrid and a TrackBarControl
1) If the row is selected the TrackBar is covered by the blue foreground color, hence not showing that a TrackBar control is available (which is confusing for the users)
2) If the row is unselected the TrackBar column not shown.
Hi Fernando,
Okay, I see the problem here. You are using the UltraControlContainerEditor to embed a control in the grid. This is fine, but if you are using the UltraControlContainerEditor, then you need to provide two controls - an editing control and a rendering control. You are only providing an editing control, which is why the trackbar only shows when you are in edit mode on the cell.
So you can fix this by creating a second trackbar and assigning the RenderingControl on the UltraControlContainerEditor.
private TrackBar trackBar = new TrackBar(); private TrackBar trackBar2 = new TrackBar(); public WinGrid() { InitializeComponent(); ultraGrid.DisplayLayout.Bands[0].Columns.Add("TestTracker"); var controlEditingControl = new UltraControlContainerEditor { EditingControl = trackBar, EditingControlPropertyName = "Value", RenderingControl = trackBar2, RenderingControlPropertyName = "Value" }; ultraGrid.DisplayLayout.Bands[0].Columns["TestTracker"].EditorComponent = controlEditingControl; }
The reason I didn't realize this immediately is that it's actually kind've unusual to embed a TrackBar control using UltraControlContainerEditor, because there's an Infragistics UltraTrackbar control which is an embeddable editor and can be embedded directly into the grid without the intermediary and I assumed that's what you are doing. So an alternative approach would be to use UltraTrackbar.
This makes the code simpler and it also has the advantage that the user can click and drag on the trackbar thumb immediately - as opposed to the Inbox Trackbar control where the user must first click the cell to go into edit mode before clicking and dragging.
private UltraTrackBar trackBar = new UltraTrackBar(); public WinGrid() { InitializeComponent(); UltraGridColumn column = ultraGrid.DisplayLayout.Bands[0].Columns.Add("TestTracker"); column.DataType = typeof(int); ultraGrid.DisplayLayout.Bands[0].Columns["TestTracker"].EditorComponent = this.trackBar; }
HI Mike,
The trackbar is on the UnitsInStock column, as you can appreciate in both rows the track is not being shown.I created a sample project which has the following issues:
The only way to show the trackbar is to actually click on its column.
Thanks for the help!
Which column in the screen shot has the Trackbar in it? I'm assuming is the UnitsInStock cell. Is that right?
How are you embedding the TrackBar into the grid?
And the screen shot you have here shows a selection color that is not the default color, so you are probably loading an ISL (Style Library File). That's going to be important in figuring our how to make this work.
Can you post a small sample project demonstrating the issue? If so, I'm sure I can figure it out and get it working for you.