Databind

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jay

    #1

    Databind

    Hello all. I'm populating a dropdown box using the databind(). I'm trying to
    get two values in one selection.
    So far I have this:
    ddlPersonType.D ataTextField = "PersDtlNam e"

    I would like to make it so the text is:

    PersDtlName (PersDtlID)
    John Doe (1)

    Does anyone have any suggestions?

    Thanks,

    - J


  • S. Justin Gengo

    #2
    Re: Databind

    Concatenate the fields in your SQL statement.

    I have an example of this in the code library on my website:
    www.aboutfortunate.com

    Rest the "All Languages" drop down to SQL and then click on the entry
    titled: "Concatenat e fields in SQL Statement"

    Happy coding!

    --
    S. Justin Gengo, MCP
    Web Developer

    Free code library at:
    www.aboutfortunate.com

    "Out of chaos comes order."
    Nietzche
    "Jay" <jerry280@yahoo .com> wrote in message
    news:%23wv07fuU DHA.2104@TK2MSF TNGP10.phx.gbl. ..[color=blue]
    > Hello all. I'm populating a dropdown box using the databind(). I'm trying[/color]
    to[color=blue]
    > get two values in one selection.
    > So far I have this:
    > ddlPersonType.D ataTextField = "PersDtlNam e"
    >
    > I would like to make it so the text is:
    >
    > PersDtlName (PersDtlID)
    > John Doe (1)
    >
    > Does anyone have any suggestions?
    >
    > Thanks,
    >
    > - J
    >
    >[/color]


    Comment

    • Jay

      #3
      Re: Databind

      How do I do that?

      I could not find your code example.

      - J

      "S. Justin Gengo" <sjgengo@aboutf ortunate.com> wrote in message
      news:efnSW3uUDH A.2156@TK2MSFTN GP11.phx.gbl...[color=blue]
      > Concatenate the fields in your SQL statement.
      >
      > I have an example of this in the code library on my website:
      > www.aboutfortunate.com
      >
      > Rest the "All Languages" drop down to SQL and then click on the entry
      > titled: "Concatenat e fields in SQL Statement"
      >
      > Happy coding!
      >
      > --
      > S. Justin Gengo, MCP
      > Web Developer
      >
      > Free code library at:
      > www.aboutfortunate.com
      >
      > "Out of chaos comes order."
      > Nietzche
      > "Jay" <jerry280@yahoo .com> wrote in message
      > news:%23wv07fuU DHA.2104@TK2MSF TNGP10.phx.gbl. ..[color=green]
      > > Hello all. I'm populating a dropdown box using the databind(). I'm[/color][/color]
      trying[color=blue]
      > to[color=green]
      > > get two values in one selection.
      > > So far I have this:
      > > ddlPersonType.D ataTextField = "PersDtlNam e"
      > >
      > > I would like to make it so the text is:
      > >
      > > PersDtlName (PersDtlID)
      > > John Doe (1)
      > >
      > > Does anyone have any suggestions?
      > >
      > > Thanks,
      > >
      > > - J
      > >
      > >[/color]
      >
      >[/color]


      Comment

      • S. Justin Gengo

        #4
        Re: Databind

        Jay,

        Here I'll copy and paste it for you:


        SELECT pk_CustomerId, (lastName + ', ' + firstName) AS fullName FROM
        tblCustomers



        --
        S. Justin Gengo, MCP
        Web Developer

        Free code library at:
        www.aboutfortunate.com

        "Out of chaos comes order."
        Nietzche
        "Jay" <jerry280@yahoo .com> wrote in message
        news:%23vlWJhSV DHA.424@TK2MSFT NGP11.phx.gbl.. .[color=blue]
        > How do I do that?
        >
        > I could not find your code example.
        >
        > - J
        >
        > "S. Justin Gengo" <sjgengo@aboutf ortunate.com> wrote in message
        > news:efnSW3uUDH A.2156@TK2MSFTN GP11.phx.gbl...[color=green]
        > > Concatenate the fields in your SQL statement.
        > >
        > > I have an example of this in the code library on my website:
        > > www.aboutfortunate.com
        > >
        > > Rest the "All Languages" drop down to SQL and then click on the entry
        > > titled: "Concatenat e fields in SQL Statement"
        > >
        > > Happy coding!
        > >
        > > --
        > > S. Justin Gengo, MCP
        > > Web Developer
        > >
        > > Free code library at:
        > > www.aboutfortunate.com
        > >
        > > "Out of chaos comes order."
        > > Nietzche
        > > "Jay" <jerry280@yahoo .com> wrote in message
        > > news:%23wv07fuU DHA.2104@TK2MSF TNGP10.phx.gbl. ..[color=darkred]
        > > > Hello all. I'm populating a dropdown box using the databind(). I'm[/color][/color]
        > trying[color=green]
        > > to[color=darkred]
        > > > get two values in one selection.
        > > > So far I have this:
        > > > ddlPersonType.D ataTextField = "PersDtlNam e"
        > > >
        > > > I would like to make it so the text is:
        > > >
        > > > PersDtlName (PersDtlID)
        > > > John Doe (1)
        > > >
        > > > Does anyone have any suggestions?
        > > >
        > > > Thanks,
        > > >
        > > > - J
        > > >
        > > >[/color]
        > >
        > >[/color]
        >
        >[/color]


        Comment

        Working...