I have a grid where the headers only inform the user what the column content is.
There is NO function I want to offer. No sorting, no column selecting, nothing.
I can sort of fool it by selecting the HeaderClickAction.ExternalSortSingle for example.
But then I still get a blue box around the headers on mouseover, which misleads the user to thinking something should happen if clicked.
I'm hoping there just something simple, like HeaderClickAction.DoNothing.
Alternatively, can I hide the column headers entirely? (in my particular case, there is only one hidden and one visible column anyway)
Hello Kennethknoepfli,
Maybe one possible approach to acheive desired behavior could be :
Kennethknoepfli said:No sorting
this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Default;
Kennethknoepfli said:no column selecting
this.ultraGrid1.DisplayLayout.Override.SelectTypeCol = Infragistics.Win.UltraWinGrid.SelectType.None;
Kennethknoepfli said:Alternatively, can I hide the column headers entirely?
ultraGridBand1.ColHeadersVisible = false;
Let me know if you have any questions.
Regards
I have this already. It does not prevent sorting on my setup.
I have this in my form constructor, my ultraGrid init stuff is immediately under InitializeComponent(), and the above is the last statement in the constructor.
No column selecting does not work either. I still get a blue box and it still sorts.
ColHeadersVisible = false DOES work, but is a bit of a brute force solution... :(
Hello,
You could use the following line of code as a possible approach to achieve what you are looking for:
private void ultraGrid1_BeforeSortChange(object sender, Infragistics.Win.UltraWinGrid.BeforeSortChangeEventArgs e) { e.Cancel = true; }
Please feel free to let me know if a question about our toolset comes up on your mind.
I am glad that I was able to assist you.
Please do not hesitate to contact us if you have any other questions in the future.
Yes, that works. Thank you very much!
Hello kennethknoepfli,
I have looked through this forum thread and you could do what you are looking for by setting the following properties of your UltraGrid:
ultraGrid1.DisplayLayout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard; ultraGrid1.DisplayLayout.Bands[0].Columns[Your Column Key].SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Disabled;
I would prefer to use the InitializeLayout event of the UltraGrid and use the very same approach there:
private void ultraGrid1_InitializeLayout(object sender, Infragistics.Win.UltraWinGrid.InitializeLayoutEventArgs e) { e.Layout.Override.HeaderStyle = Infragistics.Win.HeaderStyle.Standard; e.Layout.Bands[0].Columns[Your Column Key].SortIndicator = Infragistics.Win.UltraWinGrid.SortIndicator.Disabled; }Please feel free to let us know if you need any other assistance with this matter.
Which of the properties in HotTrackHeaderAppearance affects the blue border?
I have tried pretty much all, tried different shades of gray (or setting Alpha to transparent).
But I am still getting a blue border.
Can't hot tracking just be turned off? That would be easier.
My scenario is I want the column headers to show the column name. That's all. They should do nothing at all.
if you are talking about mouseover appearance, then you could change it using HotTrackHeaderAppearance property
Let me know if you think that I misunderstand your scenario or if you have any questions.