Click here to Skip to main content
15,904,655 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to display as Link in datagridview first column when i click it the form will appeared with list of database records then when i select the records the selected record details are updated in datagridview how to do it in vb.net

Please help me


Thank you very much
Posted

you can use item template to add link button in gridview like
XML
<asp:gridview id="GridView1" runat="server" xmlns:asp="#unknown">
AutoGenerateColumns="False">
<columns>
&lt;asp:templatefield headertext="Name"&gt;
<itemtemplate>
<big>&lt;asp:linkbutton id="lnkname" runat="server"&gt;
Text='&lt;%#Eval("Name") %&gt;'
PostBackUrl='&lt;%#"~/form.aspx?ID="+Eval("ID") %&gt;'&gt;
</big>
</itemtemplate>

</columns>

in post back url u can navigate to some other form
try this
http://csharpdotnetfreak.blogspot.com/2009/04/linkbutton-gridview-querystring.html[^]
 
Share this answer
 
v3

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