Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
760
Display Full UltraWebGrid Cell Selected DropDown Text
posted

I have a V10.2 UltraWebGrid on my page. One column is type DropDownList and displays a dynamic list of company employees.  My problem is that the grid displays many columns, so column width is at a premium. When I move the cursor over a selection on the personnel drop-down list, it highlights the selection; however, for longer names, the name is truncated and the user cannot read the entire name. Consequently, if I have two employees named "Hammerschmidt, John" and "Hammerschmidt, Joan", the user cannot determine which employee to select because he only sees "Hammerschmi". Is there a way to either provide a tooltip when the cursor is placed over a drop-down name or display the full name in the tray at the bottom of the page (preferable)?

Parents
  • 49378
    posted

    Hi megryan,

    I have investigated your case and there seems to be no obvious way to access the on hover value of a dropdownlist column. However, you may be able to use a templated column with a DropDownList inside it to handle the OnMouseOver event of the dropdown.

    Please note that this would work when hovering on options only in Mozilla. In IE, the OnMouseOver handler will be fired after selecting a new value and hovering on the dropdown.

    Here is some sample code for setting the value of the item on which the cursor is over as the text of a label:


    function mouseOverHandler(sender, e) {
    var a = (!e.target ? event.srcElement.value : e.target.value);
    document.getElementById(
    "Label2").innerHTML = a.toString();
    }


    <asp:DropDownList ID="DropDownList1" runat="server" onmouseover ="mouseOverHandler(this,event)">
    <asp:ListItem >1</asp:ListItem>
    <asp:ListItem>2</asp:ListItem>
    <asp:ListItem>3</asp:ListItem>
    </asp:DropDownList>

    Please do not hesitate to contact me if you need further assistance.

    Best Regards,

    Petar Ivanov
    Developer Support Engineer
    Infragistics, Inc.
    http://ko.infragistics.com/support

Reply Children