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)
That has the same effect as my original method, which was:
HeaderClickAction = HeaderClickAction.ExternalSortSingle;
In other words, yes, it suppresses sorting, but a blue box still appears on mouseover, which confuses the user.
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.
this.ultraGrid1.DisplayLayout.Override.HeaderClickAction = Infragistics.Win.UltraWinGrid.HeaderClickAction.Default;
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 Kennethknoepfli,
Maybe one possible approach to acheive desired behavior could be :
Kennethknoepfli said:No sorting
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