forum

Home / DeveloperSection / Forums / How to get index value in combo box?

How to get index value in combo box?

Anonymous User 2006 25-Jan-2014

I have a ComboBox with two values 'cash' and 'bank' if the user selects bank I need to enable two controls. I've tried below code:

private void comboBopay_type_SelectedIndexChanged(object sender, EventArgs e)

    {

        if (comboBobank.SelectedIndex == 1)

        {

            comboBobank.Enabled = true;

            textBorecp_no.Enabled = true;

        }

    }

Problem is the index value is -1 for both cash and bank. Where have I made an error?


c# c# 
Updated on 25-Jan-2014
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By