Solved

adding blank line to dropdownlist

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

685 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