Thanks Manish....
I need to know that If you want to display two fields in the drop down list, How do you do that ? (such as cust_code and cust_name) Could you plz notify that in the given below coding?
if (!object.Equals(Lcust, null))
{
comboBox1.DataSource = Lcust.Tables[0];
comboBox1.DisplayMember = "Name";
}
Neetika GuptaPosted May 20, 2008, 5:56 AM
In the event u can write:
Int CustCode = ComboBox1.Text.IndexOf(' ');
TextBox1.Text = ComboBox1.Text.Substring(0, CustCode);
TextBox2.Text = ComboBox1.Text.Substring(CustCode);
Dinusha GamagePosted May 16, 2008, 3:45 AM
Thanks Dear..
Could you please let me know, how to apply LostFocus() method here....? In the above mentioned combo box there two fields that is cust_code and cust_name. Once you select these two fields from the combo box, cust_code and cust_name should display in the two text boxes.
Thanks
Blocked AccountPosted May 14, 2008, 7:35 AM
write the query like this
string query = "SELECT Name + ' ' + City as display FROM Table";
and set the display member of combo box like that
comboBox1.DisplayMember = "display";
Dinusha GamagePosted May 14, 2008, 6:27 AM
Hi,
Yes, that is what I want to do. You had got it. Can you help me to solve that prob.
I'm really sorry, I don't have a chat ID.
Thank you........
Blocked AccountPosted May 14, 2008, 5:54 AM
send me your chat Id