Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

adding blank line to dropdownlist

Posted on 2004-09-27
1
386 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction As chip makers focus on adding processor cores over increasing clock speed, developers need to utilize the features of modern CPUs.  One of the ways we can do this is by implementing parallel algorithms in our software.   One recent…
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…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

839 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