Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Multiple strings on one line of a list box

Multiple strings on one line of a list box

Scheduled Pinned Locked Moved ASP.NET
databasehelpquestionlounge
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Gretna
    wrote on last edited by
    #1

    Hi I am having a problem in that I have a list box on the form and I have it so that depending on the value from an sql database the colour changes. The thing is I want to show more than one string (currently the data from the same table in the database) on the same line in the list box. I know that I can concatinate all of the string values I want to from the database and display them as one string but I was wondering if there was a better way in which I can have some sort of structure to show where one value ends and the next starts instead of having random lengthed lines. regards gretna

    "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

    A 1 Reply Last reply
    0
    • G Gretna

      Hi I am having a problem in that I have a list box on the form and I have it so that depending on the value from an sql database the colour changes. The thing is I want to show more than one string (currently the data from the same table in the database) on the same line in the list box. I know that I can concatinate all of the string values I want to from the database and display them as one string but I was wondering if there was a better way in which I can have some sort of structure to show where one value ends and the next starts instead of having random lengthed lines. regards gretna

      "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      i had an requiremnt for same case, but i have implement it using string concatination.

      Gretna wrote:

      I was wondering if there was a better way in which I can have some sort of structure to show where one value ends and the next starts instead of having random lengthed lines.

      you can use Table or GridView or you use some CutomControl , in code project there is an sample for the same.

      cheers, Abhijit

      G 1 Reply Last reply
      0
      • A Abhijit Jana

        i had an requiremnt for same case, but i have implement it using string concatination.

        Gretna wrote:

        I was wondering if there was a better way in which I can have some sort of structure to show where one value ends and the next starts instead of having random lengthed lines.

        you can use Table or GridView or you use some CutomControl , in code project there is an sample for the same.

        cheers, Abhijit

        G Offline
        G Offline
        Gretna
        wrote on last edited by
        #3

        Hi I have now moved back to my origianl problem which is the last thing on this screen to do. If i were to use a Gridview is there anyway I can add the data to it from a data reader with out having to bind it to a datasource at the start, and do you know if its possible to change the colour of the text so depending on the value of the row it changes the colour of the text. Example Row 1: firstname, lastname in red Row 2: firstname, lastname in blue Row 3: firstname, lastname in blue Row 4: firstname, lastname in red Row 5: firstname, lastname in green Thansk for the help so far. :)

        "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups