changing listbox height

Discussion in 'ASP .Net' started by Steve Chatham, Feb 10, 2004.

  1. I have a number of selections in a listbox that would be adjusted based on a
    user's login info.

    For instance, if a sales rep logs in, he'll see items A, B, C, D, and E.
    However, if it's a customer, he'll only see items A & B.

    Is there a way to specify listbox.height based on how many rows are in it,
    and have it "fit"? I'm coding in asp.net.

    Thanks,

    SC
    Steve Chatham, Feb 10, 2004
    #1
    1. Advertising

  2. Steve Chatham

    kunal Guest

    Get your Item Count based on your login rules, and set

    ListBox.Rows = ItemCount


    "Steve Chatham" <> wrote in message
    news:%...
    > I have a number of selections in a listbox that would be adjusted based on

    a
    > user's login info.
    >
    > For instance, if a sales rep logs in, he'll see items A, B, C, D, and E.
    > However, if it's a customer, he'll only see items A & B.
    >
    > Is there a way to specify listbox.height based on how many rows are in it,
    > and have it "fit"? I'm coding in asp.net.
    >
    > Thanks,
    >
    > SC
    >
    >
    >
    kunal, Feb 10, 2004
    #2
    1. Advertising

  3. That'll get me the right number of rows, but how about the listbox.height
    property?

    SC
    "kunal" <kunal.das[at]nospam.removethis.sclot.com> wrote in message
    news:%...
    > Get your Item Count based on your login rules, and set
    >
    > ListBox.Rows = ItemCount
    >
    >
    > "Steve Chatham" <> wrote in message
    > news:%...
    > > I have a number of selections in a listbox that would be adjusted based

    on
    > a
    > > user's login info.
    > >
    > > For instance, if a sales rep logs in, he'll see items A, B, C, D, and E.
    > > However, if it's a customer, he'll only see items A & B.
    > >
    > > Is there a way to specify listbox.height based on how many rows are in

    it,
    > > and have it "fit"? I'm coding in asp.net.
    > >
    > > Thanks,
    > >
    > > SC
    > >
    > >
    > >

    >
    >
    Steve Chatham, Feb 10, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    0
    Views:
    541
  2. Wotney
    Replies:
    1
    Views:
    519
    Flinky Wisty Pomm
    Oct 25, 2006
  3. tshad
    Replies:
    1
    Views:
    1,679
    bruce barker
    Mar 8, 2007
  4. Bernd Meier
    Replies:
    6
    Views:
    499
    GTalbot
    Jan 14, 2008
  5. samer
    Replies:
    3
    Views:
    415
    Gregory A. Beamer
    Sep 28, 2009
Loading...

Share This Page