data binding of combobox and textbox

Posted by Chilverupavan under C# on 5/19/2010 | Views : 5205 | Status : [Member] | Replies : 5
hi everybody,

need help,
is it possible to bind a textbox control for three times
1.in first binding i have to bind the textbox control in form load.
2.in second binding when i click button1 i have to bind the data to textboxcontrol.
3.in third binding when i click button2 i have to bind the data to textbox control.

=======================================================================================

to say clearly
my requirment is in groupbox1 i have a combobox displaying all list of courses and in textbox when a user selects particular course the particular course id should displaying in textbox control.
this is i have done..
and i have a course registration when user register new course the new course should add to combobox and textbox control.

help me......




Responses

Posted by: Yasirkudallur on: 5/20/2010 [Member] Starter

Up
0
Down
According to what i understood your question, You have to add new course name to the existing Combobox and it should be displayed in the Text Box control also.

protected void btnRegistre_Click(object sender, EventArgs e)
{
DropDownList1.Items.Insert(DropDownList1.Items.Count, new ListItem("Newly Added Course Name", "New Value"));
this.TextBox1.Text = "Newly Added Item";
}

what i understood from your question is, There are already the combo with Course Names.If you click on the Registre button, you want to add the newly registred course name to the Combos. For that you can use the code "DropDownList1.Items.Insert(DropDownList1.Items.Count, new ListItem("Newly Added Course Name", "New Value")); " and to showing to the text box, you can use the code " this.TextBox1.Text = "Newly Added Item";"

Chilverupavan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chilverupavan on: 5/20/2010 [Member] Starter

Up
0
Down
hi friend
first of all thnxs for ur reply
but iam using combobox not dropdownlist so how is it possible to add a new listitemiam developing in window application.........

any solution...

Chilverupavan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Chilverupavan on: 5/20/2010 [Member] Starter

Up
0
Down
hi friend
first of all thnxs for ur reply
but iam using combobox not dropdownlist so how is it possible to add a new listitem and iam developing my project in window application.........

any solution...

Chilverupavan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Andrewpattinson on: 11/3/2012 [Member] Starter | Points: 25

Up
0
Down
More help you can read dapfor which is provide a good tutorial for net grid on dapfor. com

Chilverupavan, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Naraayanan on: 11/3/2012 [Member] Starter | Points: 25

Up
0
Down
HI ,
Could you please paste your Code? Because your question is confused me.

Regards,
Lakshmi Naraayanan.S
http://dotnettechrocks.blogspot.in/
http://abaprocker.blogspot.com/

Chilverupavan, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response