Click here to Skip to main content
15,894,460 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: Problem with Autocomplete Textbox in AJAX Pin
fasttoshiba5-Feb-09 8:56
fasttoshiba5-Feb-09 8:56 
GeneralRe: Problem with Autocomplete Textbox in AJAX Pin
idanb22-Jun-11 22:43
idanb22-Jun-11 22:43 
Questionpopup from codebehind? Pin
laserbaronen5-Feb-09 4:22
laserbaronen5-Feb-09 4:22 
QuestionDetailsView Questions Pin
Dan Neely5-Feb-09 4:22
Dan Neely5-Feb-09 4:22 
QuestionTree View Control Pin
anandhakrishnan5-Feb-09 3:47
anandhakrishnan5-Feb-09 3:47 
AnswerRe: Tree View Control Pin
sarang_k5-Feb-09 5:11
sarang_k5-Feb-09 5:11 
QuestionDropDownList width Pin
Giorgi Dalakishvili5-Feb-09 3:38
mentorGiorgi Dalakishvili5-Feb-09 3:38 
AnswerRe: DropDownList width Pin
Abhishek Sur5-Feb-09 4:14
professionalAbhishek Sur5-Feb-09 4:14 
you can set the width dynamically using Javascript
function dynamicWidth(evt,conversionFactor){ 
var selection = document.getElementById('test'); 
if (!selection.minmax){ 
selection.minmax=[parseInt(selection.style.width),0]; 
for (var i=0; i<selection.options.length;i++){
if (selection[i].text.length>selection.minmax[1]){ 
selection.minmax[1] = selection[i].text.length*conversionFactor; 
} 
} 
} 
selection.style.width = (evt?selection.minmax[1]:selection.minmax[0]) +'px'; 
}



<body> 
<select id="test" onclick="dynamicWidth(true,20);" onblur="dynamicWidth (false,20);" onchange="dynamicWidth(false,20);" style="width:50px;"> 
<option>Option one</option> 
<option>Option two which is long</option> 
<option>Option three which is longer</option> 
<option>Option four which is even more long</option> 
</select> 
</body>


Make your adjustment to render the control html in this manner... Rose | [Rose] Rose | [Rose]

Abhishek Sur

GeneralRe: DropDownList width Pin
Giorgi Dalakishvili5-Feb-09 6:42
mentorGiorgi Dalakishvili5-Feb-09 6:42 
GeneralRe: DropDownList width Pin
Abhishek Sur6-Feb-09 1:34
professionalAbhishek Sur6-Feb-09 1:34 
Questionabout asp Pin
umeshdaiya5-Feb-09 3:23
umeshdaiya5-Feb-09 3:23 
AnswerRe: about asp Pin
SeMartens5-Feb-09 3:41
SeMartens5-Feb-09 3:41 
QuestionRe: about asp Pin
TylerBrinks5-Feb-09 15:31
TylerBrinks5-Feb-09 15:31 
AnswerRe: about asp Pin
Ranjit Viswakumar5-Feb-09 16:34
Ranjit Viswakumar5-Feb-09 16:34 
QuestionCustom WEb Confirm Box Pin
siva4555-Feb-09 3:07
siva4555-Feb-09 3:07 
AnswerRe: Custom WEb Confirm Box Pin
Abhishek Sur5-Feb-09 4:20
professionalAbhishek Sur5-Feb-09 4:20 
AnswerRe: Custom WEb Confirm Box Pin
Ranjit Viswakumar5-Feb-09 16:53
Ranjit Viswakumar5-Feb-09 16:53 
GeneralRe: Custom WEb Confirm Box Pin
siva4555-Feb-09 18:28
siva4555-Feb-09 18:28 
QuestionXMLDataSource.Data not binding right Pin
Yisman25-Feb-09 2:00
Yisman25-Feb-09 2:00 
AnswerRe: XMLDataSource.Data not binding right Pin
ToddHileHoffer5-Feb-09 2:35
ToddHileHoffer5-Feb-09 2:35 
GeneralRe: XMLDataSource.Data not binding right Pin
Yisman27-Feb-09 22:44
Yisman27-Feb-09 22:44 
GeneralRe: XMLDataSource.Data not binding right Pin
ToddHileHoffer8-Feb-09 5:16
ToddHileHoffer8-Feb-09 5:16 
AnswerRe: XMLDataSource.Data not binding right Pin
Yisman212-Feb-09 2:35
Yisman212-Feb-09 2:35 
GeneralRe: XMLDataSource.Data not binding right Pin
Jim_Gray15-Jun-10 10:04
Jim_Gray15-Jun-10 10:04 
GeneralRe: XMLDataSource.Data not binding right Pin
Yisman229-Jun-10 20:45
Yisman229-Jun-10 20:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.