Click here to Skip to main content
15,888,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi....Can Any One Help me..........Plzzzzzzzzz
Posted
Comments
[no name] 9-Oct-15 0:48am    
It can achieve based on Gridview design. So you can on OnRowCommand or simple button click event. Please go through below link:

http://www.aspsnippets.com/Articles/ASP.Net-GridView---Get-Row-Index-on-RowCommand-and-Click-events.aspx
ASPDevloper 9-Oct-15 0:50am    
Thnkx
ASPDevloper 9-Oct-15 0:54am    
How to Retrive Data from Gridview cell when clicking on linkbutton on purticular row...eg Select click nd i want record from current row which i have selectes nd cell data...
Thank You

1 solution

In ASPX page:
ASP.NET
<asp:gridview id="grd" onrowcommand="grd_RowCommand">
<columns>
<asp:templatefield>
    <itemtemplate>
		<asp:TextBox id="txtName" runat="server" />
        <asp:linkbutton id="btn" runat="server" text="Click" commandname="Click" />
    </itemtemplate>
</asp:templatefield>
</columns>
</asp:gridview>

In Code-Behind
C#
protected void grd_RowCommand(object sender, GridViewRowEventArgs e)
{
	if (e.Row.RowType == DataControlRowType.DataRow)
	{
		string name = e.Row.Cells[0].Text;
	}
}
 
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