You must Sign In to post a response.
  • Category: ASP.NET

    Asp GridView onmouseover

    i am using asp GridView.
    i want onmouseover 2 function work in same time.
    working in any one function. i want tooltip and row colour chage in mouse over in same time.

    Pls Help me.




    I. onmouseover - 2 function

    1. Grid1.Rows(i).Attributes.Add("onmouseover", "tip_it('ToolTip','" & title & " ','" & newToolTip & "'); Activate();")

    2. Grid1.Attributes("onmouseover") = "javascript:setMouseOverColor(this);"


    II. onmouseout - 2 funciton

    1. Grid1.Attributes("onmouseout") = "javascript:setMouseOutColor(this);"
    2. Grid1.Attributes.Add("onmouseout", "tip_it()")


    <script>

    function tip_it(which, TTitle, TContent){


    if(which){

    update_tip_pos();

    tip_active = 1;

    document.getElementById('ToolTip').style.visibility = "visible";

    EnterContent(TTitle, TContent);

    document.getElementById('ToolTip').innerHTML = ContentInfo ;

    }else{

    tip_active = 0;

    document.getElementById('ToolTip').style.visibility = "hidden";
    }

    }

    </script>

    <script language="javascript">

    var oldgridSelectedColor;

    function setMouseOverColor(element)
    {
    oldgridSelectedColor = element.style.backgroundColor;
    element.style.backgroundColor='#E9E9E8';
    element.style.cursor='hand';

    }

    function setMouseOutColor(element)
    {
    element.style.backgroundColor=oldgridSelectedColor;
    element.style.textDecoration='none';

    }

    </script>
  • #264111
    u r overwriting the onmouseover attribute instead u append it in the same line

    Grid1.Rows(i).Attributes.Add("onmouseover", "tip_it('ToolTip','" & title & " ','" & newToolTip & "'); Activate();setMouseOverColor(this);")

    Grid1.Attributes("onmouseout") = "javascript:setMouseOutColor(this);tip_it();"

    i belive this will solve your issue

  • #264132
    Thank to subbiah kalidass,

    i am working in the same line. but not worked.
    how is use in script side.

    using in "tip_it(which, TTitle, TContent)" function.


  • This thread is locked for new responses. Please post your comments and questions as a separate thread.
    If required, refer to the URL of this page in your new post.