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

Cut off SELECT

Hhi,

I'm working on an asp .net project that have small side panel which
'disallow' long SELECT/dropdown list.. So i could not force them to a certain
that shows my longest option, which now most of my option was being
'cut-off' half way, not able to show to full text..

Is there any way I could do some thing like in e Mozilla FireFox (as
currently using IE), which 'opens' e dropdown list when being click and shows
e full text that is longer than e defined width..

Million thanx in advance..

Feb 28 '07 #1
4 5774
Place a div around dropdown set the width of the dropdown is 100% and
restrict the width of div to your side bar... in style of div set show scroll
auto...this can resolve the situation or you can use some 3rd party like
infragistics

"siLver" wrote:
Hhi,

I'm working on an asp .net project that have small side panel which
'disallow' long SELECT/dropdown list.. So i could not force them to a certain
that shows my longest option, which now most of my option was being
'cut-off' half way, not able to show to full text..

Is there any way I could do some thing like in e Mozilla FireFox (as
currently using IE), which 'opens' e dropdown list when being click and shows
e full text that is longer than e defined width..

Million thanx in advance..
Feb 28 '07 #2
Thanx for ur reply..

But this is not some thing that I wanted to do.. I tried your suggestion,
this method puts the whole dropdownlist into e DIV, which ended scrolling the
whole dropdownlist while the text is still 'cut-off' half way..

Or is there any way for me to add a Tooltip into each option of e
dropdownlist? So as when user mouseover then show the full-text of e selected
option in e Tooltip.. Had did some research online and found out that 'title'
don't work on IE.. but most of my users will be using IE..

Like to do some thing like our Windows taskbar (thru it is a 'drop-up'
list), for each of e items in e drop-up list there will be a Tooltip
available when mouseover. This Tooltip will show the full-text of e item
being mouseover..

Is there any way that I could do this??
Thanx again..
"nettellect" wrote:
Place a div around dropdown set the width of the dropdown is 100% and
restrict the width of div to your side bar... in style of div set show scroll
auto...this can resolve the situation or you can use some 3rd party like
infragistics

"siLver" wrote:
Hhi,

I'm working on an asp .net project that have small side panel which
'disallow' long SELECT/dropdown list.. So i could not force them to a certain
that shows my longest option, which now most of my option was being
'cut-off' half way, not able to show to full text..

Is there any way I could do some thing like in e Mozilla FireFox (as
currently using IE), which 'opens' e dropdown list when being click and shows
e full text that is longer than e defined width..

Million thanx in advance..
Mar 1 '07 #3
title does work in IE... however I cannot find a way to add the title
attribute to each option in a databound dropdownlist. I'm trying to find this
information for myself also, I posted a question on this newsgroup yesterday
about this topic.

If you happen to find the solution could you please let me know... I'll do
the same.

Gav

"siLver" wrote:
Thanx for ur reply..

But this is not some thing that I wanted to do.. I tried your suggestion,
this method puts the whole dropdownlist into e DIV, which ended scrolling the
whole dropdownlist while the text is still 'cut-off' half way..

Or is there any way for me to add a Tooltip into each option of e
dropdownlist? So as when user mouseover then show the full-text of e selected
option in e Tooltip.. Had did some research online and found out that 'title'
don't work on IE.. but most of my users will be using IE..

Like to do some thing like our Windows taskbar (thru it is a 'drop-up'
list), for each of e items in e drop-up list there will be a Tooltip
available when mouseover. This Tooltip will show the full-text of e item
being mouseover..

Is there any way that I could do this??
Thanx again..
"nettellect" wrote:
Place a div around dropdown set the width of the dropdown is 100% and
restrict the width of div to your side bar... in style of div set show scroll
auto...this can resolve the situation or you can use some 3rd party like
infragistics

"siLver" wrote:
Hhi,
>
I'm working on an asp .net project that have small side panel which
'disallow' long SELECT/dropdown list.. So i could not force them to a certain
that shows my longest option, which now most of my option was being
'cut-off' half way, not able to show to full text..
>
Is there any way I could do some thing like in e Mozilla FireFox (as
currently using IE), which 'opens' e dropdown list when being click and shows
e full text that is longer than e defined width..
>
Million thanx in advance..
>
Mar 9 '07 #4
Found a solution....

You cannot add attributes to ListItems!! so heres how I got around it...
don't use asp:DropDownList!! Let me explain:

Instead use HTML select and a repeater to fill the select;

in aspx page
<select>
<asp:Repeater ID="rptListItems" Runat="server">
<ItemTemplate>
<option value='<%# DataBinder.Eval(Container.DataItem,
"DBItemValue") %>' title='<%# DataBinder.Eval(Container.DataItem,
"DBItemFullDesc") %>'><%# DataBinder.Eval(Container.DataItem,
"DBItemShortDesc") %></option>
</ItemTemplate>
</asp:Repeater>
</select>

Couple of things to note, do not add 'runat="server"' to the select (if you
do this and switch from HTML to design in VS, VS messes your code up). If you
wish to postback on selection change you will have to add more custom code
starting with adding 'onchange="_doPostBack('','');"' to the select. If your
unsure about the _doPostBack just google it theres plenty out there on that.

Also if you need to validate the dropdown?! (which i'm doing). I did it by
adding a asp:TextBox add a RequiredFieldValidator to the TB and in the select
put 'onchange="tbDropDownSelection.value =
this.options[this.selectedIndex].value"'. This validates the dropdown
selection when the forms submit button is clicked.

Hope any of this helps, Regards
Gav
"Gav" wrote:
title does work in IE... however I cannot find a way to add the title
attribute to each option in a databound dropdownlist. I'm trying to find this
information for myself also, I posted a question on this newsgroup yesterday
about this topic.

If you happen to find the solution could you please let me know... I'll do
the same.

Gav

"siLver" wrote:
Thanx for ur reply..

But this is not some thing that I wanted to do.. I tried your suggestion,
this method puts the whole dropdownlist into e DIV, which ended scrolling the
whole dropdownlist while the text is still 'cut-off' half way..

Or is there any way for me to add a Tooltip into each option of e
dropdownlist? So as when user mouseover then show the full-text of e selected
option in e Tooltip.. Had did some research online and found out that 'title'
don't work on IE.. but most of my users will be using IE..

Like to do some thing like our Windows taskbar (thru it is a 'drop-up'
list), for each of e items in e drop-up list there will be a Tooltip
available when mouseover. This Tooltip will show the full-text of e item
being mouseover..

Is there any way that I could do this??
Thanx again..
"nettellect" wrote:
Place a div around dropdown set the width of the dropdown is 100% and
restrict the width of div to your side bar... in style of div set show scroll
auto...this can resolve the situation or you can use some 3rd party like
infragistics
>
"siLver" wrote:
>
Hhi,

I'm working on an asp .net project that have small side panel which
'disallow' long SELECT/dropdown list.. So i could not force them to a certain
that shows my longest option, which now most of my option was being
'cut-off' half way, not able to show to full text..

Is there any way I could do some thing like in e Mozilla FireFox (as
currently using IE), which 'opens' e dropdown list when being click and shows
e full text that is longer than e defined width..

Million thanx in advance..
Mar 9 '07 #5

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

Similar topics

1
by: JT | last post by:
I have an input form for which I've created a "matrix" for user input. Basically, the user chooses a radio button and then through javascript, a select box is displayed to define a value for that...
4
by: Elroyskimms | last post by:
Using SQL 2000... tblCustomer: CustomerID int CompanyName varchar(20) HasRetailStores bit HasWholesaleStores bit HasOtherStores bit tblInvoiceMessages:
4
by: bobsawyer | last post by:
I've been building a series of SELECT lists that are populated dynamically using HTTPRequest. Things are going pretty well, and I've got the whole thing working flawlessly in Mozilla/Firebird....
3
by: dumbledad | last post by:
Hi All, I'm confused by how to replace a SELECT statement in a SQL statement with a specific value. The table I'm working on is a list of words (a column called "word") with an index int...
10
by: serge | last post by:
Using "SELECT * " is a bad practice even when using a VIEW instead of a table? I have some stored procedures that are identical with the difference of one statement in the WHERE clause. If I...
1
by: serena.delossantos | last post by:
Trying to insert into a history table. Some columns will come from parameters sent to the store procedure. Other columns will be filled with a separate select statement. I've tried storing the...
9
chunk1978
by: chunk1978 | last post by:
hey everyone, i've been trying to solve this problem for 2 days straight, with no end in sight. i would greatly appreciate anyone's help. EXPLANATION: There are 3 Select Menus. The 1st and...
2
by: naima.mans | last post by:
Hello, i want to select 2 following brothers nodes wich are one under another (one closed to another)... i have done one xslt file... but it's not really good.. for example: the xml file:...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
6
by: Apaxe | last post by:
In the database i have a table with this information: key_id =1 key_desc =43+34+22+12 I want sum the values in key_desc. Something like: SELECT key_desc FROM table But the result of...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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,...

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.