IE dropdown width issue, IE dropdown width problem,internet explorer dropdown list
We can add tooltip to all list items but in server side we have to add by loop. it is not feasible if u already
coded, or too many items can bind in dropdown list.
We can add tooltip for elements which are cutting in IE sample code is following it is based on jQuery
1)
<asp:DropDownList ID="DropDownListIEIssue" onmouseover="return test(this);" runat="server" Width="100">
</asp:DropDownList>
2)
3)
if (!IsPostBack)
{
string[] test = new string[] { "dddddddddddddddddddd", "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccc" };
DropDownListIEIssue.DataSource = test;
DropDownListIEIssue.DataBind();
}
Thanks
Mahesh K. Sharna $("option", sender).each(function () {
function AddToolTipOnDropDownLists(sender)
{
try
{
$("option", sender).each(function () {
$(this).attr("title", $(this).html());
});
/*For slected element*/
$(sender).attr('title',$('option:selected',sender).html())
}
catch (Exception)
{
}
}
1)
<asp:DropDownList ID="DropDownListIEIssue" onmouseover="return test(this);" runat="server" Width="100">
</asp:DropDownList>
2)
3)
if (!IsPostBack)
{
string[] test = new string[] { "dddddddddddddddddddd", "aaaaaaaaaaaaaaaaaa", "bbbbbbbbbbbbbbbbbbbbbbbbbbbbb", "ccccccccc" };
DropDownListIEIssue.DataSource = test;
DropDownListIEIssue.DataBind();
}
Thanks
Mahesh K. Sharna
function AddToolTipOnDropDownLists(sender)
{
try
{
$("option", sender).each(function () {
$(this).attr("title", $(this).html());
});
/*For slected element*/
$(sender).attr('title',$('option:selected',sender).html())
}
catch (Exception)
{
}
}
2 comments:
I was facing the same problem so i fixed this issue on my own way just check this out http://dropdownwidthproblem.blogspot.com/2011/07/i-was-on-google-round-clock-for.html
Hi,
You can find a better solution here as it is not user friendly to show tool tip on mouse over.
http://jquerybyexample.blogspot.com/2012/05/fix-for-ie-select-dropdown-with-fixed.html
Post a Comment