Solved

adding blank line to dropdownlist

Posted on 2004-09-27
1
399 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
[X]
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
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

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

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

If you're writing a .NET application to connect to an Access .mdb database and use pre-existing queries that require parameters, you've come to the right place! Let's say the pre-existing query(qryCust) in Access takes a Date as a parameter and l…
Calculating holidays and working days is a function that is often needed yet it is not one found within the Framework. This article presents one approach to building a working-day calculator for use in .NET.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
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…

710 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