473,725 Members | 1,833 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 1270
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
11060
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
6160
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
12622
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
2110
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
1585
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
8303
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
9295
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
7359
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
38606
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
5908
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
8886
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
8751
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
9257
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
9171
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
8093
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...
1
6702
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4514
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4781
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2155
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.