Solved

adding blank line to dropdownlist

Posted on 2004-09-27
1
352 Views
Last Modified: 2008-03-10
I have read several answers to this already but they don't work for my code or Iam not doing it right.
Here is my code. Once my dropdownlists are populated, I need  a blank line at the top.

ByVal oDr As OracleClient.OracleDataReader, _
                                                ByVal iPadSize As Integer, _
                                                ByVal iMode As enmActiveMode)
        Dim i As Integer

        With objddl
            .Items.Clear()
            If oDr.HasRows Then
                While oDr.Read
                    .Items.Add(rPad(Trim(oDr(0).ToString), " ", iPadSize) & _
                             " - " & Trim(oDr(1).ToString))
                End While
            End If

            If iMode = modStartup.enmActiveMode.amAdd Then    (this is true)
                ' add extra blank item
                .Items.Add("")                    (doesn't work)

            End If



thanks,

6784
0
Comment
Question by:6784
1 Comment
 
LVL 28

Accepted Solution

by:
iboutchkine earned 250 total points
ID: 12163058
I think it adds a blank line on the bottom. Try to movr it up

With objddl
            .Items.Clear()

            If iMode = modStartup.enmActiveMode.amAdd Then    (this is true)
                ' add extra blank item
                .Items.Add("")                    (doesn't work)

            End If


            If oDr.HasRows Then
                While oDr.Read
                    .Items.Add(rPad(Trim(oDr(0).ToString), " ", iPadSize) & _
                             " - " & Trim(oDr(1).ToString))
                End While
            End If


0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
The ECB site provides FX rates for major currencies since its inception in 1999 in the form of an XML feed. The files have the following format (reducted for brevity) (CODE) There are three files available HERE (http://www.ecb.europa.eu/stats/exch…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

759 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now