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
1878
Disable certain items in WinCombo
posted

Hi,

I'm using a WinCombo to show the payment methods that can be used for an order (credit card, money transfer, cheque, etc.). For our partners we have stored their available payment methods in database so I want to disable the payment methods that are not applicable for them. As I found in another posting this can be easily done by setting the Activation property of the Row to Activation.Disabled. This also works nearly perfectly fine, I cannot select disabled payment methods with the mouse but I still can use the cursor keys on the keyboard and select payment methods that are disabled. Do I have to set any other properties to prevent that or handle some events?

Thanks in advance, Wolfgang

Parents
No Data
Reply
  • 469350
    Offline posted

    Hi Wolfgang,

    If you are able to select disabled rows in the Combo, then something is wrong. I tried this out and it works fine for me, though. I am not able to select a disable row via the mouse or the keyboard, whether the combo is dropped down or not.

    I have attached my sample project here so you can see if you get the same results. If you do, then something is wrong in your app. If you don't, then this must be a bug in whatever version of the controls are you using.

    WindowsFormsApplication14.zip
Children