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 Reply
  • 640
    Verified Answer
    posted in reply to Scott

    Hi Scott,

    You should look at the documentation to find out what properties/methods are available.

     Of course as much as we try to document everything there are some things that you can only find by debugging the code.

    This can be easily done either with Visual Studio which has good javascript debugger or with the developer tools that are present in almost every browser.

    To try out the visual studio debugger write "debugger;" in the javascript code and run the application in debug mode and it should break at that statement. All the visual studio debugging features like "Quick Watch" will be available and you can explore the objects that way.

    Check this blog post for more information.

    About your last question.

    The "get_element()" method returns the actual html dom element so you should use its "style" property.

    function WebDataGrid1_Grid_MouseOver(sender, eventArgs)
    {
      if (eventArgs.get_type() == "row") {
        eventArgs.get_type().get_element().style.fontWeight = "bold";
      }
    }

    Hope this helps

Children