Can you please help me with some code re attaching a WintrackBar as a cell editor in WinGrid? Thank you
What part is giving you trouble? You need to assign the EditorControl property of the cell/column to the instance of the UltraTrackBar that you have. Alternatively, you can set the Style of the column to TrackBar.
-Matt
hello,
How do I set the maximum value of the trackbar when using the cellStyle as a trackbar. I mean the value of the cell is the value of the trackbar; but how to set the maximum, minimum values of the track bar itsself
Use the MinValue and MaxValue properties of the column.
Thank you... This is what I needed.
Hello,
If you need different Min, Max values on each row than you could use different UltraTrackBar editors on each row, where every editor Min/Max values are set based on the Min/Max Age columns in the InitializeRow event of the UltraGrid. The code snippet is something like the following :
private void ultraGrid1_InitializeRow(object sender, Infragistics.Win.UltraWinGrid.InitializeRowEventArgs e) { UltraTrackBar tr = new UltraTrackBar(); tr.MinValue = (int)e.Row.Cells["MinAge"].Value; tr.MaxValue = (int)e.Row.Cells["MaxAge"].Value; e.Row.Cells["Age"].EditorControl = tr; }
Please let me know if you have any further questions.
Sincerely,
Danko
Developer Support Engineer
Infragistics
www.infragistics.com/support
but i want each row to have different minimum and maximum values.
Here is the task at hand, I have a grid with three columns MinAge, MaxAge, Age; e.g.
Row #1: 3 | 7 | 2
Row #2: 6 | 12 | 2
I want to show the age as slider in relation to the minimum and maximum values which differ from one row to another
thanks,