473,608 Members | 1,820 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Is it possible to create editable drop down list using ASP.NET?

2 New Member
Is it possible to create editable drop down list using ASP.NET?
Mar 25 '07 #1
2 23253
CurtisExpert
1 New Member
Yes it is, go to this site. he has a link to download the C# code.
http://weblogs.asp.net/coltk/archive/2003/09/17/27772.aspx
May 10 '07 #2
pooja g
2 New Member
u can use textbox and dropdown list to make editable dropdown list

<asp:DropDownLi st ID="dropdown" runat="server" Font-Bold="True" Style="z-index: 100;

left: 222px; position: absolute; top: 341px" Width="239px" Height="23px" Enabled="False" AutoPostBack="T rue" OnSelectedIndex Changed="ddlHan dlerRouteName_S electedIndexCha nged">
<asp:ListItem >----New Item?----</asp:ListItem>

<asp:ListItem>H ello</asp:ListItem>

<asp:ListItem>W orld</asp:ListItem>

</asp:DropDownLis t>

----------------------------------------------------------->>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>>>>>>>>>>>>> >>>

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

protected void dropdown_Select edIndexChanged( object sender, EventArgs e)
{

if (this.dropdownS electedIndex == 0)
{

this.textbox.Te xt = "";
this.dropdown.V isible = false;

this.textbox.Vi sible = true;
}

}

protected voidtextbox_Tex tChanged(object sender, EventArgs e)
{

int index = 0;if(!this.drop down.Items.Cont ains(new ListItem(this.t extbox.Text.Tri m())))
{

this.dropdown.I tems.Add(this.t extbox.Text.Tri m());
}

for (int i = 0; i < this.dropdown.I tems.Count; i++)
{

if (dropdown.Items .Text == this.textbox.Te xt)
{

index = i;

}

}

this.dropdown.S electedIndex = index;
this.dropdown.V isible = true;

this.textbox.Vi sible = false;
}
Oct 24 '07 #3

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

Similar topics

7
2309
by: jason | last post by:
Is there a way - possibly a disconnected rs? - to update the contents of an existing pulldown on a page without having to re-submit the page for the user to see the pulldown populated with an additional value? I realise there are javascript possibilities (and I am still searching for a usable one) but I thought perhaps it may be possible to allow a user to add a new entry to a drop down box that had been dynamically populated from an...
6
9316
by: Filiz Duman | last post by:
I was just wondering, is it possible to write into the drop down box in order to jump to a specific item. The reason why I am asking is my drop down box has many items and additionally to the scrolling down, it would be good if the user can write into the box in order to get the specific entry the list selected. Is this possible ? Thanks.
2
1630
by: Arpan | last post by:
An ASP application retrieves the DISTINCT records from all the columns of a SQL Server DB table & populates them in drop-down lists. The no. of drop-down lists on the web page depends upon the no. of columns in the DB table. For e.g. if the DB table has, say, 5 columns, the web page will show 5 drop-down lists. Assume that the DB table stores information pertaining to books like book name, category to which the book belongs to (like...
2
1140
by: alien2_51 | last post by:
In the EditCommand event I've added a drop down list to the controls collection for the cell I want to edit. Dim objDDLBrake As New DropDownList objDDLBrake.CssClass = "label1" objDDLBrake.Items.Add("A") objDDLBrake.Items.Add("H")
2
5033
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" oneditcommand="GLRulesGrid_Edit"
1
1461
by: kafi | last post by:
Hi All; I am looking for an editable drop down control that can be used on a web page using ASP.NET. The reason I need an editable DDL is that on my web app. (using ASP.NET) I have a DDL that has a list of materials, if user cannot find the material that he/she wants they should be able to enter it themselves. Suggestion for a good third party control is welcome too. Thanks
1
1956
by: subhashk | last post by:
Is it possible to create a editable HTML drop down list using javascript?
3
10470
by: anya | last post by:
Hi, I would like to have an editable DropDownList in my ruby on rails application. The user should be able to select a value from the list of choices, or type in a new value (in one of the empty options in the list of choices) if no predefined choice is applicable. I tried the { :include_blank => 'True'} option but it just provides a blank option included with a set of options for the drop-down list. Here is my code: <%=...
2
3703
by: Doug | last post by:
Hi, I can't figure out how to create a drop-down list box. The help file says it exists. The icon in the help file matches the combobox in the toolbox. I tried using a combox box, both with and without using the wizard, and it will not "drop-down" - the list is horizantal. I don't see a variable to set to change that. I tried the listbox in the toolbox, and it is also horizantal (tried that first). The behavior I want is to list,...
0
8071
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8013
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8488
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8360
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6831
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
4039
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2482
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
1
1613
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1345
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.