I've doubt regarding combobox control? [Resolved]

Posted by Sudheep.grandhe under C# on 10/18/2011 | Points: 10 | Views : 685 | Status : [Member] | Replies : 4
Hi,

I've an doubt about combo box control in my application.when trying to use the combobox it wont shows the some properties like.dropdownlist control is availlable in windows application?

cmb_CustomerName.DataValueField = "CustId";
cmb_CustomerName.DataTextField = "CustName";
cmb_CustomerName.DataBind();

Best,
Sudheep.



Responses

Posted by: Ndebata on: 10/18/2011 [Member] Starter | Points: 50

Up
0
Down

Resolved
It has displaymember and valumember

comboBox1.DisplayMember = "CustName";

comboBox1.ValueMember = "CustId";

Databind is not required for this.

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

Posted by: Sudheep.grandhe on: 10/18/2011 [Member] Starter | Points: 25

Up
0
Down
Hi,

when i typed cmb_CustomerName.DataBindings.it displayed like this whether it is correct or not?.
Session["OrderNo"] = txt_OrderNo.Text;
Session["InvoiceNo"] = txt_InvoiceNo.Text;.these two are used in asp.net.but i want to rewrite the same code in windows applications.how it is?.please do the needful.


Best,
Sudheep.

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

Posted by: Hmanjarawala on: 10/18/2011 [Member] Bronze | Points: 25

Up
0
Down
Hello sudeep,
in window application there is nothing like combobox.Databindings and there is not need to use any state management functionality like session as windows applications are statefull so use variables instead of session to store values.

Himanshu Manjarawala
Sr. Software Engineer@AutomationAnywhere
http://fieredotnet.wordpress.com/

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

Posted by: Alex_4youin on: 10/18/2011 [Member] Starter | Points: 25

Up
0
Down
combobox1.DataSource = ds;

combobox1.DisplayMember = "Name";

combobox1.ValueMember = "Id";

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

Login to post response