Click here to Skip to main content
15,888,733 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
In my gridview im showing only one cell data of the row(ex: in my table i have ID,NAME,ADDRESS,PHONE in this im showing only NAME in my gridview) with select linkbutton while clicking the select button it should get all the data from database in session respect to that particular row(ex: ID,ADDRESS,PHONE). how to do this.plz help me.
Posted

Use DataKeys Property of gridview to store primary key of each record
see example below
DataKeyNames
 
Share this answer
 
This Description is not Enough For Understand But You Can Try This:-
First Of All If You Want This at Same Form Do This this Code is verty Easy But also very Rare on google
Bind Your Link Button at Binding Time Like
XML
onclick="GetData('<%# Eval("ID")%>','<%# Eval("ADDRESS")%>','<%# Eval("PHONE")%>');"

Now Values Wiil not be Shown in Grid But You Can Use These Without Postback
Pls Let Me Know if This Helps.
 
Share this answer
 
v2
Comments
dineshdena 5-May-12 7:48am    
in my first page i have 3 dropdown used to search in database in that if the search button clicked it will searching regarding to the dropdown selected items and show detail regarding to that search in database (detail : is one column in database)it will show in gridview along with link button. if i click the link button it should be get redirected with the details of the selected row from database.

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