Tuesday, February 8, 2011

Hiding the header on an Infragistics Winform UltraCombo

I've gone through just about every property I can think of, but haven't found a simple way to hide the header on a winform UltraCombo control from Infragistics.

Headers make sense when I have multiple visible columns and whatnot, but sometimes it would be nice to hide it.

To give a simple example, let's say I have a combobox that displays whether something is active or not. There's a label next to it that says "Active". The combobox has one visible column with two rows -- "Yes" and "No".

When the user opens the drop down, they see "Active" or whatever the header caption for the column is and then the choices. I'd like it to just show "Yes" and "No" only.

It's a minor aesthetic issue that probably just bothers me and isn't even noticed by the users, but I'd still really like to know if there's a way around this default behavior.

RESOLUTION: As @Craig suggested, ColHeadersVisible is what I needed. The location of the property was slightly different, but it was easy enough to track down. Once I set DisplayLayout.Bands(0).ColHeadersVisible=False, the dropdown display the way I wanted it to.

  • <DropDownLayout ColHeadersVisible="No"></DropDownLayout> works for us. This is on Infragistics NetAdvantage for .NET 2008.

    Kevin Fairchild : Is this for the Winforms control or Web?
    Craig : This would be the web controls.
    From Craig
  • My understanding of the Infragistics WinForms suite is that the UltraCombo is designed for multi-column (or embedded UltraGrid) use.

    What I did to get around this was to replace those UltraCombos with UltraComboEditor controls. These are IG's "enhanced" versions of the standard .NET combobox.

    That may or may not be appropriate in your case, depending on your usage scenario. However, it looks like you have a resolution using the original UltraCombo, which will definitely be lower-impact on your existing code.

    (And thanks to you and Craig both: I actually overlooked that property when I went through this pain the first time; I'm making a mental note of where it is for the future!)

    From John Rudy

0 comments:

Post a Comment