All I want to do is Add a button in gridview from which i want to perform some functionality with current row data
this is my gridview code
<asp:GridView ID="dgvHMDEditorialManage" runat="server" CellPadding="4" ForeColor="#333333" GridLines="None" OnRowCommand="dgvHMDEditorialManage_RowCommand" OnRowCreated="dgvHMDEditorialManage_RowCreated" >
<AlternatingRowStyle BackColor="White" ForeColor="#284775" />
<EditRowStyle BackColor="#999999" />
<FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
<PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
<RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
<SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
<SortedAscendingCellStyle BackColor="#E9E7E2" />
<SortedAscendingHeaderStyle BackColor="#506C8C" />
<SortedDescendingCellStyle BackColor="#FFFDF8" />
<SortedDescendingHeaderStyle BackColor="#6F8DAE" />
</asp:GridView>
C# Code
using (SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["DefaultConnection"].ToString()))
{
SqlCommand cmd = new SqlCommand(query, con);
con.Open();
DataSet ds = new DataSet();
dgvHMDEditorialManage.DataSource = cmd.ExecuteReader();
dgvHMDEditorialManage.DataBind();
}
here i am setting datasource of gridview
now i want to add a button in gridview in which on clicking it i want to perform some function with current row data
Can anyone suggest me how to do this
Thanks