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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 29, 2012, 11:44 PM EDT
or may be other
ashkan s7 reputationPosted Oct 30, 2012, 12:34 AM EDT
ashkan s7 reputationPosted Oct 30, 2012, 12:35 AM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 30, 2012, 12:35 AM EDT
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 30, 2012, 12:41 AM EDT
radComboBox1.SelectedItem = "disable textbox 1";
Dorababu MekaRank #457 · 5.5K reputationPosted Oct 30, 2012, 12:51 AM EDT
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;
}