Click here to Skip to main content
15,893,401 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi developers,

How Can I display the the image(s) in Grid view, when ever a Record has been entered in to the Database.if the entered person is MALE, "M"(Image) should be displayed,if FEMALE is entred in to Database "F" ,Image should be added to Grid view..

and if i right click on the "M" or "F"(image), corressponding details should be come like when he joined, Place ,city ,address should come.

Please tell me .

Thanks and Regards,

Thiru
Posted
Comments
Sandeep Mewara 18-Jun-10 1:20am    
What have you tried so far? There are lots of article on internet where images are shown in grids... have you looked into them? Where are you stuck up?

1 solution

Hi In Grid View you can add Template Column, in which there would be Image.

In Item Data Bound event check for the M or F and depending on that, Set the Image Path.

You can take the reference of below articles:
Paging, Selecting, Deleting, and Editing in the ASP.NET 2.0 GridView Control with Keyboard Shortcuts

Editable Nested GridView (All-in-One)

For right click, i will suggest, use the Toolttip / Title property of Image. It will display the information on hover event.

If you have UI concerns then you can use Tooltip plugin of JQuery.

Regards,
Jitendra Zaa
 
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