473,548 Members | 2,716 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to edit text in a combobox

51 New Member
hi,

I have a combobox which has dropdown style set to "dropdownlist"( since i dont want the element getting populated in the combobox to be edited).

Apart from populating the comboxbox from items form the file am giving an extra item "New" which should allow the user to add new element.

but the problem which i come across is since the dropdown list dont allow th user to edit the text am not able to edit nethng.

So could anyone tell me how to make tht particular text enable on index change

thanx
Jan 21 '09 #1
4 13107
Frinavale
9,735 Recognized Expert Moderator Expert
Have you tried to implemented a method to handle the SelectedIndexCh anged Event which enables the TextBox?
Jan 27 '09 #2
Smish
51 New Member
i tried but i couldn't enable it..
Jan 28 '09 #3
tlhintoq
3,525 Recognized Expert Specialist
If the problem is that you can't edit text while the style is DropDownList, but the text IS editable when the style is DropDown.... then change the style back to DropDown when the user selects the 'New' option.

Expand|Select|Wrap|Line Numbers
  1. ((ComboBox)sender).DropDownStyle = ComboBoxStyle.DropDown;
  2.  
Then when the focus leaves that control, change the style back to DropDownList.
Jan 28 '09 #4
Smish
51 New Member
thanx a lot buddy ..it worked :)
Jan 29 '09 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
12033
by: RRoberto | last post by:
Goodmorning, Is it possible to edit a combobox like a textbox? I will appreciate any suggestion . Thank You Roberto
2
4456
by: Amanda H | last post by:
I am trying to edit a long text cell in Enterprise Manager but when I select "<long text>" and try to delete it, I get an error saying "cannot edit this cell". Could anyone tell me how to edit this cell? Thanks, Amanda
11
2100
by: Nina | last post by:
I have a text file which stores user input. Later if user edited the input data from a input form. How can I update the input text file? If update the text file too often, would it cause problem? Thanks in advance for any help.
0
1309
by: Lakshmanakumar | last post by:
how Can i implement Masked Edit Text box using ASP
3
2235
by: cyberco | last post by:
I must be overlooking something here... I'm trying to edit a line in a text file. I thought this was easy with fileinput, but all examples do not write the line back to the file but simply 'print' it. I want to open the file, edit the line and save it again. Is fileinput the right module for that?
4
23025
by: moondaddy | last post by:
I need to edit the text in many files so I'm writing a small routine to do this. First I have a method that loops through all the files in a directory and passes the full file path to another method (ReadFile). I'm going to use this to edit the file paths in all of my WMP play lists. When I run this the string variable is not being changed...
0
4486
by: programming | last post by:
hi all, here is the php code! i am trying to use to 'edit' hyperlink to edit txt in member.txt. Problem is that it reads the values ok into an array, however when i attempt and update new values into the file, i get no results. Does anybody know where i am going wrong???? <? session_start(); // Set updated content for user
2
4039
by: coet | last post by:
I make program with Delphi Borland 7 and access as database, my problem is date between that I must put in edit.text first for the result came out base on the date that I put there.see My query before and tell me where I do wrong modulkop.ADOisiSHU.SQL.Clear; modulkop.ADOisiSHU.SQL.Add('INSERT INTO Simpanan( NoAnggota, NamaAnggota, Iuran,...
4
3159
by: mwcapps | last post by:
I have unformatted text in my SQL 2005 database. I'm pulling it into a masked edit text box with a (999)999-9999 mask. Unfortunately, when I attempt to save the data back it doesn't work because I don't know how to get the 'masked' information back to the 'unmasked' raw data that the database wants.
0
7518
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7444
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7954
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7805
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6039
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5085
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3497
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3478
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1932
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.