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
405
the header of ultraCombo
posted

Hi, 

I set ultraCombo as below:

cbExh.DataSource = ExhDict;             // ExhDict is a generic dictionary<string, object>

cbExh.DisplayMember = "Key";

cbExh.ValueMember = "Value";

then when I drop down this combo, it displays like a grid.

I have two problems now:

1. How to make this combo just display DisplayMember, not like a grid?

2. How to hide the header of this combo?

     I have tried to set cbExh.DisplayLayout.Bands[0].HeaderVisible = false, but it's not working..

Could you give me some suggestions about these two problems?

thanks a lot!

  • 469350
    Verified Answer
    Offline posted

    AzoleLai said:
    1. How to make this combo just display DisplayMember, not like a grid?

    Handle the InitializeLayout event and hide the columns you don't want to see. This works exactly the same as it does in the WinGrid.

    AzoleLai said:
    2. How to hide the header of this combo?

    You probably want ColHeadersVisible on the Band, rather than HeaderVisible. HeaderVisible is for the band header, which is hidden by default.

    Once again, you could do this in the InitializeLayout and it's exactly the same as it is in the grid.