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
633
MouseOver Sample Code Needed
posted

Are there any good sample snippets of how to use the MouseOver client-side event of the WebDataGrid?

 

My problem is I am trying to gain access to the row being hovered over and do some action based on that. how do I gain access to the row being hovered over?

On another note, what tool can i use to see the sender and eventArgs properties/methods available. You never realize how much you need intellisense until it's not there!?

Sample code for other Mouse events would help too... Thanks.

Parents
No Data
Reply
  • 640
    Verified Answer
    posted

    Hi Scott,

    You can have a look at the documentation about WebDataGrid client side events here.

    Or just look at this sample.

    <%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %> 

    <%@ Register tagprefix="ig" namespace="Infragistics.Web.UI.GridControls" Assembly="Infragistics4.Web.v10.3, Version=10.3.20103.1, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" %> 

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

     

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head id="Head1" runat="server">

        <title></title>   

    </head>

    <body>

        <form id="form1" runat="server">

            <asp:ScriptManager ID="ScriptManager1" runat="server">

            </asp:ScriptManager>

     

            <script type="text/javascript">

                function myFunc(sender, args)

                {

                    if(args.get_type() == "row")

                    {

                        var index = args.get_item().get_index();

                        alert("You hovered over row " + index);

                    }

                }

            </script>

           

            <ig:WebDataGrid ID="iggv" runat="server" AutoGenerateColumns="true" Width="400px" Height="400px">

                <ClientEvents MouseOver="myFunc" />

            </ig:WebDataGrid>   

        </form>

    </body>

    </html>

    Hope this helps

     

Children