Solved

adding blank line to dropdownlist

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 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