473,911 Members | 5,835 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

drop down list problems

SAL
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items will
be showing in the drop list. This doesn't seem to work with the web control.
This bring up the issue of the first item in the list being displayed after
adding items to the drop down. However, you cause the SelectedIndexCh anged
event you'd have to select a different item and then come back to the first
item to get the selectedindexch anged to fire for the first item in the list.
Is there a way around these couple of issues? I'm very new to ASP.NET stuff.

Thanks
S
Dec 19 '06 #1
3 1281
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexCh anged event you'd have to select a different item and then
come back to the first item to get the selectedindexch anged to fire for
the first item in the list. Is there a way around these couple of issues?
I'm very new to ASP.NET stuff.

Thanks
S
Dec 19 '06 #2
SAL
Hmmm, that's awfully simple Karl. Let me see.... :)

S

"Karl Seguin" <ka********@rem oveopenmymindre movemetoo.andme netwrote in
message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
>Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexC hanged event you'd have to select a different item and then
come back to the first item to get the selectedindexch anged to fire for
the first item in the list. Is there a way around these couple of issues?
I'm very new to ASP.NET stuff.

Thanks
S

Dec 19 '06 #3
I'd suggest to also set your 'value' to -1, especially if queries using the
items are based on a numeric value

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com
"SAL" <SA**@NoNo.comw rote in message
news:ex******** ******@TK2MSFTN GP03.phx.gbl...
Hmmm, that's awfully simple Karl. Let me see.... :)

S

"Karl Seguin" <ka********@rem oveopenmymindre movemetoo.andme netwrote in
message news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Would adding a blank item at the top solve your problem?

Karl

--
http://www.openmymind.net/
http://www.fuelindustries.com/
"SAL" <SA**@NoNo.comw rote in message
news:%2******** ********@TK2MSF TNGP03.phx.gbl. ..
Hello,
is there a way to get this webcontrol to behave more like its winform
cousin?
In a winform dropdown, you can set the SelectedIndex to -1 and no items
will be showing in the drop list. This doesn't seem to work with the
web
control. This bring up the issue of the first item in the list being
displayed after adding items to the drop down. However, you cause the
SelectedIndexCh anged event you'd have to select a different item and
then
come back to the first item to get the selectedindexch anged to fire for
the first item in the list. Is there a way around these couple of
issues?
I'm very new to ASP.NET stuff.

Thanks
S


Dec 19 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
11073
by: ehm | last post by:
I am working on creating an editable grid (for use in adding, deleting, and editing rows back to an Oracle database). I have a JSP that posts back to a servlet, which in turns posts to a WebLogic SFSB and, from there, to the database. On the front end, all cells appear as text fields. However, for certain cells, when the user clicks on the cell, the text field turns into a drop-down field (i.e. Select object), defaulting to the value...
3
6174
by: Don Wash | last post by:
Hi There! I have a Server-side Drop-down box in ASP.NET (VB) page. What do I do to widen the Drop down box's Pull-Down list's width? I'm not talking about the Drop-down box's width but the box that appear when user clicks the drop-down arrow button. Because items in the Drop down list are a little long, user can't see the full thing when they pull down the items from the drop down list.
2
12631
by: Yoshitha | last post by:
hi I have 2 drop down lists in my application.1st list ontains itmes like java,jsp,swings,vb.net etc.2nd list contains percentage i.e it conatains the items like 50,60,70,80,90,100. i will select any skill in 1st drop down list then i'll select % of this skill in the 2nd list box , based on the percentage i've selected in the 2nd list box it has to display 2 sets of drop down list boxes at run time one for selecting skill and
2
2120
by: Joey Liang via DotNetMonster.com | last post by:
Hi all, I am new in asp.net, i encounter some problems in using drop down list and datagrid. I have manage to bind the data into datagrid but i wanted to bind the data into the datagrid accroding to the selected brand from the drop down list. I do not have any idea how to do it. Does anyone knows how to bind the data in to datagrid accroding to the drop down list selected item? if there is a way would u mind paste the code or any...
0
1591
by: dutone | last post by:
I have searched high and low for a solution to this and I dont think its possible.... but I hope not. What I have is a list of items with various values that can be changed via a drop down. Each of the items will have a value that was previously selected by the user. When the data is displayed, the previously selected values must be set as the default in the drop down. The ids of each drop down are created acording to their index in...
6
8321
by: mcgrew.michael | last post by:
I hope this is the right group. I am very new to ASP so this is probably a stupid question. I have some vbscript that query's AD and populates a recordset. I know the recorset contains the information I want by doing a Response.write. I am having problems dynamically creating a drop down list from the data in the recordset. The drop down is created but it is empty. Any help would be greatly appreciated. A sample of the code: <% 'On...
4
9305
by: TycoonUK | last post by:
Hi, As I do not have IE7 on my computer, I was wondering if there is a fault in my CSS Menu when using IE7. Please can someone look at my site - http://www.worldofmonopoly.co.uk and tell me if it works, and if it does not, tell me why it does not work. Thanks.
3
7367
by: penny111 | last post by:
Hi there, For my application, i need to have 3 drop down lists 1. drop down list of folder names 2. drop down list of documents in the folder selected 3. drop down list of instances of the document selected (my application uses the BusinessObjects Java Web Services SDK) The 2nd list is dependent on the 1st, while the 3rd list is dependent on the 2nd. In other words, this is what i want my application to do -select a folder from the...
4
38620
by: jack.vier | last post by:
I have a table that I am manipulating as a table, not as a form. Is it possible to have a drop down list in a table? I came across this: http://groups.google.com/group/comp.databases.ms-access/browse_thread/thread/509fbf44455ab35d/2e0bced904cccbfa?lnk=gst&q=Drop+down+list+table&rnum=4&hl=en#2e0bced904cccbfa The person answering the question seems to imply that a form should be used if a drop down list is needed. Am I correct in thinking...
3
5917
by: jcassan | last post by:
Hello folks. I am new to these forums and have something, which has been stumping me for little while. I am using pspell to spellcheck a scrolling textbox (textarea) containing user input. I analyze each word and rebuild the text string as a combination of correct text (not misspelled) and a drop down list offering suggestions in place of any misspelled words. Pretty common stuff using pspell. I display the new string so that the user...
0
10038
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
11349
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10921
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...
1
11057
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10541
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
9728
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
7250
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4776
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
3
3360
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.