473,382 Members | 1,743 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,382 software developers and data experts.

Dropdownlist: handling very wide listitems

I am populating a dropdownlist via a databind to a database. However, the
text to be displayed can be very long, making the dropdownlist very wide. I
need some way to reduce the width of the dropdownlist but still show the
entire text of the listitem option.

Observations:
1. Setting the dropdownlist to a fixed width chops off the option text to
the width of the control (making long text invisible).
2. Listitem elements are plain text only and do not render any HTML tags.
3. The listitem class is sealed/notInheritable, so making a special listitem
class appears not to be an option.

Ideally, the dropdownlist listitem would be able to wrap the text within a
fixed width field, while still acting as a single unit for selection
purposes.

Another possibility which appears to be impossible is to manually truncate
the long option to a fixed number of characters and then use a tooltip to
show the full text. Listitems don't support tooltips, however.

Does anyone have any ideas on how to deal with this?
Nov 19 '05 #1
1 3544
It appears I could use a specialty control, such as EasyListBox

http://easylistbox.com/demoCustomized.aspx

Still, it would be preferred to do this without a special control.
Nov 19 '05 #2

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

Similar topics

2
by: DesignerX | last post by:
I am being sent an ArrayList of ListItems. I can bind to a dropdownlist control using: oDropDownList.DataSource = oArrayList This works but when the dropdownlist is rendered both the select...
4
by: Luis Esteban Valencia | last post by:
Hi Everyone, How do you get two or more listitems to have the same value? I am trying to do this: <asp:dropdownlist id="one" runat="server"> <asp:listitem text="hello" value="hi" />
1
by: Jeff | last post by:
Hi - I'm creating a web control library (using VB.NET), and I'm trying to add a modified asp:dropdownlist control to it. How do I add asp:ListItems to the dropdownlist (within the web control...
1
by: Geoffrey van den Ouden | last post by:
I'm converting this project from ASP.NET 1.1 to 2.0, and the thing I came across is that my dropdownlist no returns the content of the Value property in a correct way. I'm not using a direct...
0
by: Jose Fernandez | last post by:
Hello First of all, excuse my english We all know that in a normal page with codebehind we add a dropdownlist control and we bind() it in the (!ISPOSTBACK), so, we don't need to go to database...
1
by: Jason Wilson | last post by:
I have two dropdownlists that are bound to the same datasource and I have a couple of questions: 1) Because they are bound to the same datasource, I am assuming that they only make 1 round trip...
5
by: Mark Rae | last post by:
Hi, Here's one just for my own interest - I know how to add ListItems programatically, and how to concatenate fields in SQL queries... But, is there any way to specify anything other than a...
0
by: Radu | last post by:
I have a global resource, Scorecards.resx. For stuff like <asp:CustomValidator id="validDate" Text="*" ErrorMessage= "<%$ Resources:Scorecards, String66 %>" Display="Dynamic"...
1
by: Nathan Sokalski | last post by:
I am creating a control in which I inherit from the DropDownList. The only method that I override is RenderContents. Here is my basic code: Public Class StatesDropDownList : Inherits DropDownList...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.