473,791 Members | 3,071 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dropdownlist display not displaying current

I have a dropdown list set up to show 4 items on screen.

If you select an item below that 4, it will not display on the screen (but
it is selected).

When you postback the list shows the first four and you have to scrolldown
to see the one you chose. Is there a way to have the dropdownlist show the
one (or the first one) that is selected? This is confusing to the user as
he thinks nothing is selected.

Thanks,

Tom
Nov 19 '05 #1
1 1198
If you are not recreating the elements then the selected element should
remain selected. Here is a demo:
http://societopia.net/Samples/webform4.aspx
If you are recreating the elements of the listbox upon processing the
postback event then you will have to save the selected value first before
recreating the listitems then set the selected index to that value
afterwards. I do a similar action in a listbox demo that I have on my
website http://www.webswapp.com/webswapp.aspx?i=12

---
http://www.webswapp.com
http://www.societopia.net
"tshad" <ts**********@f tsolutions.com> wrote in message
news:eH******** ******@TK2MSFTN GP12.phx.gbl...
I have a dropdown list set up to show 4 items on screen.

If you select an item below that 4, it will not display on the screen (but
it is selected).

When you postback the list shows the first four and you have to scrolldown
to see the one you chose. Is there a way to have the dropdownlist show the one (or the first one) that is selected? This is confusing to the user as
he thinks nothing is selected.

Thanks,

Tom

Nov 19 '05 #2

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

Similar topics

3
7811
by: Northern | last post by:
I need to write code clear the display box of my DropDownList (something like clear current selected item) while still keep the loaded item list in the DropDownList. I tried DropDownList's ClearSelecttion() method and set SelectedIndex to -1 but neither works. How should I do this? Thanks
6
5409
by: Scott Lee | last post by:
I am displaying an ASP.Net generated form in a popup opened with window.showModalDialog. The form contains DropDownList controls. The first ddl is populated via databinding to a datatable, has its AutoPostBack set to true and has its SelectedIndexChanged event being handled in codebehind. The event fires as it should populating two more ddls. The problem is, the two ddls appear empty. I have used a javascript alert to look at the...
0
1046
by: Mark Rae | last post by:
Hi, Trying to debug an ASP.NET v1.1 site where ToolTips are not displaying on <asp:DropDownList> controls. Since this isn't a built-in property of these controls, I did a Google search and the suggested method seems to be to add a title="<ToolTip goes here>" tag to the <asp:DropDownList> declaration. This is what my client is trying to do. However, it's not working i.e. the ToolTip doesn't display when users hover over the...
1
1874
by: Trevor Bezotte | last post by:
Hi, I'm new to asp.net. I am having trouble updating and displaying a profile property through a dropdownlist. I believe the problem has something to do with autoeventwireup but I'm not sure. If I change the selection in the dropdownlist and click Button1, the profiles database gets updated and the control shows my new selection, but when I browse to a different page and come back to this page, the dropdownlist gets set back to the default...
2
7917
by: Dabbler | last post by:
In my Registrant FormView I have a DropDownList which loads data from a secondary SqlDataSource "sdsOfficeParks". I need the user to select an office park but save the selected value in the FormView's ObjectDataSource "odsRegistrant" . The following solution can't work because I need the ddl selected value bound to my odsRegistrant but both tables have the same column name for primary key. <asp:DropDownList ID="ddlOfficePark"...
1
1824
by: savvy | last post by:
I am developing a Garments shopping cart. On the single product page where the customer selects size and colour of a garment and if its ok for him, then adds to his basket, so every time he checks for Colour (dropdownlist) and Size (dropdownlist) I'm checking whether the Item is "In Stock" or "Out of Stock" and displaying the same using a Label outside. Is their any way so that I can display "In Stock" or "Out of Stock" inside the...
1
16847
by: JJ | last post by:
Hi. I am having trouble getting a dropdownlist to work properly in a detailsview: The code is something like: <asp:DetailsView ID="dvwSubscriber" runat="server" AutoGenerateRows="False" DataKeyNames="ID" DataSourceID="objCurrentSubscriber" DefaultMode="Insert" HeaderText="Subscriber Details">
0
938
by: No Master | last post by:
Hi I want to create a dropdownlist at runtime, add it to my datatable in my dataset, then pass the whole dataset in to a session and display it in my datalist. The dropdownlist will be unique for each row in the table of the dataset. Using .NET for web development One problem is I don't know how to refer to the Row within the asp:DropDownList - as shown below .aspx code <datalist> <datatemplate> <asp:DropDownList id=ddl...
1
4268
by: shapper | last post by:
Hello, I am trying to display a DropDownList on an ASP.NET MVC view. SlidePaper.Targets contains the list of items and SlidePaper.Slide.Target contains the current value taken from the database for the given record ... This works but does not give the current value, only the list: <%= Html.DropDownList(null, "Targets") %.
0
9669
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
9515
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
10207
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
10155
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
9029
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
7537
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
5559
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4110
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
2916
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.