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";
}

Blocked AccountRank #403 · 6.2K reputationPosted May 14, 2008, 1:54 AM EDT
send me your chat Id
Dinusha Gamage67 reputationPosted May 14, 2008, 2:27 AM EDT
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 AccountRank #403 · 6.2K reputationPosted May 14, 2008, 3:35 AM EDT
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 Gamage67 reputationPosted May 15, 2008, 11:45 PM EDT
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
Neetika Gupta12 reputationPosted May 20, 2008, 1:56 AM EDT
In the event u can write:
Int CustCode = ComboBox1.Text.IndexOf(' ');
TextBox1.Text = ComboBox1.Text.Substring(0, CustCode);
TextBox2.Text = ComboBox1.Text.Substring(CustCode);