Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 19th, 2003, 11:21 AM
Authorized User
 
Join Date: Jun 2003
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to capture the combobox text ???

I use the DataSource like below to fill a Combobox:

comboBox1.DataSource = dataSet1.Tables["Suppliers"];
comboBox1.DisplayMember = "ProductName";

When the user types any keyboard key i use the DROPDOWN property, like below, to show all combobox itens:

this.comboBox1.DroppedDown = true;

I use the content of the Combobox text to update my database.
I have a problem when the combobox lost focus, because the combobox text is cleaned. And its impossible to update the Database.
This only occurs when the user typing a new combobox item in a combobox text.

If i disable the Drop Down property my code works whell.

There is a way to make the DROP DOWN property works together the LOST FOCUS without clearing the new Combobox Text???

Thanks...
Thomaz
Reply With Quote
  #2 (permalink)  
Old September 22nd, 2003, 04:22 AM
Friend of Wrox
Points: 3,558, Level: 25
Points: 3,558, Level: 25 Points: 3,558, Level: 25 Points: 3,558, Level: 25
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: California, USA
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Dear Thomaz:
Could u explain more! I couldnt get u well.

Always:),
Hovik Melkomian.
Reply With Quote
  #3 (permalink)  
Old September 22nd, 2003, 08:11 AM
Authorized User
 
Join Date: Jun 2003
Location: Rio de Janeiro, Rio de Janeiro, Brazil.
Posts: 58
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Ok MELVIK;

The problem is the (DroppedDown) property.

When one combobox receives the focus I places the property (DroppedDown = true), but when this combobox loses the focus the text was typed in the ComboboxTextfield is cleaned.

It´s impossible to capture a new text typing because the droppedDown property cleaned the Combobox Text Field.

I thank its reply....
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ComboBox text ts0708 Excel VBA 1 June 11th, 2007 02:05 PM
Center Text In ComboBox wb8bgy Visual Basic 2005 Basics 3 March 2nd, 2007 09:06 AM
how to capture the text in column khautinh C# 0 December 19th, 2003 01:38 PM
Capture Keystroke in a text box xgbnow Visual C++ 0 October 1st, 2003 11:34 AM
Update the combobox text ??? thomaz C# 1 September 15th, 2003 08:32 PM



All times are GMT -4. The time now is 09:13 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.