Click here to Skip to main content
15,889,315 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I've got a datagridview which has a column that I need to be able to be selected, something like a hyperlink. it needs to look like a hyperlink, but with out redirecting to a new page, I just want it to read that row, use the data, and pull another table to display more information. I've not been able to find any good tutorials that rightly explain how to handle this and was really hoping that I could get some assistance here. if anyone has some helpful tips, I would greatly appreciate it.

Thanks in Advance
Sean8084
Posted
Comments
Tejas Vaishnav 4-Oct-11 1:29am    
please correct your answer what you want, provide some code or simplify your question for better understanding..

i also give one solution if it will help you...
see it and follow it if you want like this..

for your solution..
1) you need to put a template filed in your gridview,
2)in that template field's, item template you need to put a link button control.
3)then you need to add a command argument property to your link button that will be unique for all record that will be shown in your grid..

4) on the gridviews item click event of that link button you need to write your code what you want..

this will be not redirect to you new page...
 
Share this answer
 
Comments
Sean8084 4-Oct-11 13:29pm    
This is exactly what I needed, I really appreciate your assistance!
Tejas Vaishnav 5-Oct-11 1:36am    
so please rate my ans...
Sean8084 5-Oct-11 14:25pm    
Happy?
I haven't done exactly this, but I can give an idea.

When you are binding data to the GridView, you can formatted it as a hyperlink easily. Include a JS invoke into that anchor tags on 'OnClick' event. So you can pick the event on client side. Then through an AJAX call get rest of the data that you want to display.
 
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