Hi~,
I'm using ColumnStyle.TrackBar Column in my grid, and I want to remove the scale of TrackBar.
Please let me know if it is possible.
Hello hedgehog0213,
There are different approaches to solve this task.
Option 1: You could handle ultraGrid2_InitializeLayout() event of your UltraGrid and set the property ViewStyle. For example:
private void ultraGrid2_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e)
{
((TrackBarEditor)e.Layout.Bands[0].Columns["C"].Editor).ViewStyle = TrackBarViewStyle.Vista;
}
Please take a look at the attached screenshot to see different styles
Option 2: You could use the properties:
((TrackBarEditor)e.Layout.Bands[0].Columns["C"].Editor).TickmarkSettingsMajor.Visible = DefaultableBoolean.False;
((TrackBarEditor)e.Layout.Bands[0].Columns["C"].Editor).TickmarkSettingsMinor.Visible = DefaultableBoolean.False;
Option 3: You could use UltraTrackBar control like a EditorComponent into your grid`s column
Please let me know if you have any questions.
Regards
Hi~Georgi!!
Thanks for your kind explanation, but when I try to use Option 1 approach, it occurs "NullReferenceException"!!
do you know what's wrong with me?
I'll attach the exception information, please help me!!
Hm, strange. Could you please tell me what is your current version and do you have any installed service release and which one. Also could you please tell me which method / event you are using to set this code. Are you using InitializeLayout event ?
I'm using NetAdvantage 10.3, service release 2145.
Also I'm using InitializeLayout event, and I can confirm the ViewStyle property is Default in breakpoint.
But if I changed ViewStyle property from Default to Vista, then the exception occurs.
Thanks for provided information. I was able to reproduce your issue using the same version. It seems that this issue is fixed in the next versions. The product lifecycle of your version - 10.3 is expired (more details you could find at http://es.infragistics.com/help/product-lifecycle/ ) and we are not able to include this fix in version 10.3, that`s why I made small sample specialy for you, how to solve this issue using your current version. Please take a look at the attached sample and let me know if you have any questions.
Thanks Georgi, I really appreciate your help!!^^