473,463 Members | 1,527 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

editable dropdown list in web applications

i want editable dropdown list in c#.net 2003..

any body help me..
its urgent


guru
Oct 10 '07 #1
3 1895
editable combo box is there r not in windows application in vs.net 2001

if it is there means give me the solution...



urgent
Oct 10 '07 #2
Frinavale
9,735 Expert Mod 8TB
What do you mean by "editable DropDownList"?
How is the user going to be able to edit it?

It sounds like you're going to want to create/develop/implement a user control that is based on a DropDownList that allows the user to edit the contents of the DropDownList.

-Frinny
Oct 10 '07 #3
u can use textbox and dropdown list to make editable dropdown list
Expand|Select|Wrap|Line Numbers
  1. <asp:DropDownList ID="dropdown" runat="server" Font-Bold="True" Style="z-index: 100;
  2.  
  3. left: 222px; position: absolute; top: 341px" Width="239px" Height="23px" Enabled="False" AutoPostBack="True" OnSelectedIndexChanged="ddlHandlerRouteName_SelectedIndexChanged"> 
  4. <asp:ListItem>----New Item?----</asp:ListItem>
  5.  
  6. <asp:ListItem>Hello</asp:ListItem>
  7.  
  8. <asp:ListItem>World</asp:ListItem>
  9.  
  10. </asp:DropDownList>
  11.  
----------------------------------------------------------

whn user click on new item show textbox and hide drop down and when he write new item in textbox then add tht item in drop down and make it visible
Expand|Select|Wrap|Line Numbers
  1. protected void dropdown_SelectedIndexChanged(object sender, EventArgs e) 
  2. {
  3.  
  4. if (this.dropdownSelectedIndex == 0) 
  5. {
  6.  
  7. this.textbox.Text = ""; 
  8. this.dropdown.Visible = false;
  9.  
  10. this.textbox.Visible = true; 
  11. }
  12.  
  13. }
  14.  
  15. protected voidtextbox_TextChanged(object sender, EventArgs e) 
  16. {
  17.  
  18. int index = 0;if(!this.dropdown.Items.Contains(new ListItem(this.textbox.Text.Trim()))) 
  19. {
  20.  
  21. this.dropdown.Items.Add(this.textbox.Text.Trim()); 
  22. }
  23.  
  24. for (int i = 0; i < this.dropdown.Items.Count; i++) 
  25. {
  26.  
  27. if (dropdown.Items.Text == this.textbox.Text) 
  28. {
  29.  
  30. index = i;
  31.  
  32. }
  33.  
  34. }
  35.  
  36. this.dropdown.SelectedIndex = index; 
  37. this.dropdown.Visible = true;
  38.  
  39. this.textbox.Visible = false; 
  40. }
Oct 24 '07 #4

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

Similar topics

0
by: Philip Townsend | last post by:
I have a datagrid that contains a dropdown list that is part of an EditItemTemplate. I need to run some code when the dropdown list builds in order to preselect an item in the list. Preselecting...
0
by: george d lake | last post by:
Hi, Is there a way to have a "Auto Complete" textbox or a "editable" dropdown? Here is my problem. I have a screen that need to have a list of 800+ employees. To be a dropdown, that could be a...
1
by: Kenneth Keeley | last post by:
Hi, Is there a way to create a editable drop down list. This would be some sort of text box with a drop down list attached. My idea is to have a text box that has a dropdown list that has some...
1
by: Philip Townsend | last post by:
I have a datagrid that contains a dropdown list that is part of an EditItemTemplate. I need to run some code when the dropdown list builds in order to preselect an item in the list. Preselecting...
1
by: Larry Rekow | last post by:
Using: MS SQL, VS.Net 2003, VB.Net Each night our SQL db imports two text file reports into two tables: Table 1 has info on various shipments (shipment number, date, destination, etc.) Table 2...
2
by: zambizzi | last post by:
....I can't seem to get my hands on a control I'm loading in an editable datagrid. Here's my datagrid control: <asp:datagrid id="GLRulesGrid" runat="server" autogeneratecolumns="False"...
0
by: Mike C | last post by:
I've been grappling with this for days and hope someone has some suggestions. I have a datagrid that I'd like to place entirely in edit mode so people don't have to update data row by row. I've...
4
by: Paul | last post by:
Hi all, I have a page that has a form on it which has a dropdown list on it. It connect to an sql database and populate the list. What I would like to do is make the list editable so that if the...
0
by: mirin | last post by:
Hello, In a Default.aspx page, I need to display an unbound grid with the following editable columns: Name, Location, Phone, Paid, Amount Initially the grid would be empty with only the...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
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...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.