I have a MVC3 WebGrid in my View.I want to display a tooltip when the mouse hovers over any row, displaying information coming from the server. I have already seen this link:
Show a tooltip with more info when mousover a MVC3 Razor WebGrid row
My point is,how will I get the ID of the row on mouseover event,because the information coming from the server will be based on row ID or maybe count. Also, in this link:
http://www.lullabot.com/files/bt/bt-latest/DEMO/index.html
you need a certain Selector to show the tooltip.So how can I assign a class to each row of WebGrid so I can display the tooltip?
Here is how I did it. Because of the limited nature of the default WebGrid, you are left with a few options… I needed this to work with IE6 and could NOT find a suitable jQuery plugin that would work in all browser, so I opted for option 1. Warning: It’s a bit dirty
1 – Roll your own HtmlHelper
2 – Use a third-party alternative to WebGrid
3 – Use a jQuery plugin
HtmlHelpers.cs
YourView.cshtml