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,
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.
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!
Sorry, you lost me. I didn't understand your last reply at all. I was asking you about the Trackbar in the UnitsInStock column. Is the MinValue and MaxValue of this trackbar always the same for every row? Or do you intend the minimum and maximum for this trackbar to vary based on the other fields in the row?
Having a variable min and max will be very tricky, especially if you intend for the user to be able to edit those values.
Hi MIke,
What I meant is that each column (min and max) will have a trackbar to control its value. However this trivial task is proving to be too difficult with Infragistics controls, I'll remove the grid and do it manually on the form creating my own custom controls.
Thanks for your help anyway.
Okay. I thought you pretty much had it working. What other obstacles remain that are prompting you to use another control?
If your min and max do not vary from row to row, then setting them is a simple matter of setting the MinValue and MaxValue on the grid column, as I mentioned.
Hi Mike,
I didn't found a way to link the value of a column with the value on the trackbar, not the min or max but the actual value selected and then change the value of the column accordingly if the trackbar is moved.
But it's ok, is going to be much easier to just create a user control with a textbox and a trackbar and then add it with a button to a form.
Thanks!
Kindest Regards,
Fernando, Bautista Quinteros.
The DataType of the column has to be an integer, as I mentioned earlier. I think in the sample you have here, it's a string, so that's probably why it's not working. As long as the cell value is an Int and it's within the range of the MinValue and MaxValue (which should also be Ints), you don't have to do anything special. The Trackbar will show the value of the cell and moving the Trackbar will update the cell value automatically.
But if it's easier to create your own control, I will consider the issue closed.