Click here to Skip to main content
16,005,038 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hello friends,
I m developing window app in c# .
I have 2 radiobutton. and 1 combobox.
I want to bind combobox with different 2 dataset depends on checked on radiobutton.

Can anyone help me please?

THANKS IN ADVANCE.
Posted
Comments
Sandeep Mewara 15-Dec-10 3:36am    
So whats the issue here?

you can use CheckedChanged event of radio button


DataSource property of combobox
:-D
 
Share this answer
 
write condition something like
C#
private void RadioButton_CheckedChanged(object sender, System.EventArgs e)
{
  if (sender is RadioButton)
  {
    RadioButton radiobutton = sender as RadioButton;
    if (radiobutton.Checked)
    {
      comboBox1.DataSource = DataSet1;
    }
    else
    {
      comboBox1.DataSource = DataSet2;
    }

  }
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900