Click here to Skip to main content
15,891,864 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi dear friend..

gridview row on mouse over popup image?
i want to pop up thumb nail image for on mouse over gridview each row. if on mouse over each row contains different thumb nail image for each row..


Regards

Shivanand Nagarabetta.
Posted
Updated 10-May-17 5:15am

You can do the following by:
1. Inject Javascript function on mousehover & mouseout of the link in a grid row.
2. Using JavaScript, show a div that contains the needed details(image here) when you hover your mouseover that row
3. Using JavaScript, hide the div onmouseout.


For injecting JS, you need to use RowDataBound of GridView, something like:
C#
protected void GridView_RowDataBound(Object sender, GridViewRowEventArgs e)
{  
   DataControlRowType rtype = e.Row.RowType;   
   if (rtype == DataControlRowType.DataRow && rtype != DataControlRowType.Footer 
       && rtype != DataControlRowType.Separator && rtype != DataControlRowType.Header 
       && rtype != DataControlRowType.Pager)   
   {  
      // Show div    
      // Add parameters of image as per need. may be image location passed
      e.Row.Attributes.Add("onmouseover", "ShowDiv(this);");
      //Hide div
      e.Row.Attributes.Add("onmouseover", "HideDiv(this);");
   }
}

Show the div onmouseover event of the grid cell, and
Hide the div onmoustout event of the grid cell.

Try!
 
Share this answer
 
i give you a one link i think it will solve your problem

Display/Store and Retrieve Image Data from Database to Gridview, and also on Mouse Over[^]
 
Share this answer
 
plz can u send the java script and css..

Warm Regard

Shivanand Nagarabetta.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900