Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
340
Is it possible to fix one column in a grid?
posted

Hello-

I have a grid with one column that I'd like to fix (freeze in place) so when the user scrolls all of the other columns scroll except that one.

I can achieve this by turning Fixed Headers on (in the designer) and then doing this: ultraGrid1.DisplayLayout.Bands[0].Columns[0].Header.Fixed = true;

However by turning them on, it allows the user to pin/freeze/fix any other column that they want, and I do not want this behavior. Any way to disable the other columns? I'm looking maybe for a Before event that will fire when they click on the little pin icon where I can simply cancel.

Thanks much in advance!

Parents
No Data
Reply
  • 22852
    Suggested Answer
    Offline posted

    Hello,

     

    You can prevent the user from being able to pin columns by not showing the fixed header indicators.  The following code accomplishes this:

    this.ultraGrid1.DisplayLayout.Override.FixedHeaderIndicator = Infragistics.Win.UltraWinGrid.FixedHeaderIndicator.None;

    Alan

Children
No Data