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)
{
}
}