hi
i want when select a combo box item , change enable properties other text box
but i use telerik compunent
i cant do this a work
please help me
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Dorababu MekaPosted Oct 30, 2012, 4:51 AM
private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem == "disable textbox 1")
textBox1.Enabled = false;
if (comboBox1.SelectedItem == "disable textbox 2")
textBox2.Enabled = false;
if (comboBox1.SelectedItem == "disable textbox 3")
textBox3.Enabled = false;
if (comboBox1.SelectedItem == "disable textbox 4")
textBox4.Enabled = false;
}
But you assigned the text as follows
this.radDropDownList1.DropDownAnimationEnabled = true;
radListDataItem1.Text = "disable textbox1";
radListDataItem1.TextWrap = true;
radListDataItem2.Text = "disable text box2";
radListDataItem2.TextWrap = true;
radListDataItem3.Text = "disable text box3";
radListDataItem3.TextWrap = true;
radListDataItem4.Text = "disable text box4";
radListDataItem4.TextWrap = true;
So your code should be
private void comboBox1_SelectedValueChanged(object sender, EventArgs e)
{
if (comboBox1.SelectedItem == "disable text box1")
textBox1.Enabled = false;
if (comboBox1.SelectedItem == "disable text box2")
textBox2.Enabled = false;
if (comboBox1.SelectedItem == "disable text box3")
textBox3.Enabled = false;
if (comboBox1.SelectedItem == "disable text box4")
textBox4.Enabled = false;
}
Dorababu MekaPosted Oct 30, 2012, 4:41 AM
radComboBox1.SelectedItem = "disable textbox 1";
Dorababu MekaPosted Oct 30, 2012, 4:35 AM
ashkan sPosted Oct 30, 2012, 4:35 AM
ashkan sPosted Oct 30, 2012, 4:34 AM
Dorababu MekaPosted Oct 30, 2012, 3:44 AM
or may be other