473,412 Members | 4,519 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,412 software developers and data experts.

changing listbox height

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

Nov 18 '05 #1
2 4689
Get your Item Count based on your login rules, and set

ListBox.Rows = ItemCount
"Steve Chatham" <me@privacy.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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

Nov 18 '05 #2
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:%2****************@TK2MSFTNGP10.phx.gbl...
Get your Item Count based on your login rules, and set

ListBox.Rows = ItemCount
"Steve Chatham" <me@privacy.net> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl...
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


Nov 18 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Patty O'Dors | last post by:
Hi I have some code to create an ownerdrawn listbox (derived), and when I add an item to it, the bold text of the first item (the title, 'Collections and Maturities') mysteriously seems to get...
1
by: Dan Bass | last post by:
I'm looking to develop a listbox with in-place editing where as each item is selected, it grows to fit in all the text boxes. When the item is deselected, it shrinks back to its original size. The...
1
by: Edward | last post by:
I am having a terrible time getting anything useful out of a listbox on my web form. I am populating it with the results from Postcode lookup software, and it is showing the results fine. What...
1
by: yamne | last post by:
I have a problem. When I click in edit datagrid button I show two listbox and two button. I use two button to move data between two listbox. My problem is that I can't call the listbox in the...
4
by: Moe Sizlak | last post by:
Hi There, I am trying to return the value of a listbox control that is included as a user control, I can return the name of the control but I can't access the integer value of the selected item,...
4
by: Bob P. | last post by:
Hello, I have a page with: * two side-by-side asp:listboxes and two arrow asp:buttons allowing users to add/remove email addresses between them -- very much like Outlook, where you have the...
0
by: David J | last post by:
Hi, I am strugling with the propertygrid and a listbox. I am using the universaldropdowneditor from the codeproject (code below). However I am populating the listbox via a datasource. The problem...
3
by: Hugh O | last post by:
Hi, There is a ROW property on the Web Listbox control within VB.Net. The description states it is "The number of visible rows to display". I have tried setting this property in many different...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.