Hi,
I am trying to access first column of the gridview and make some changes to the column. this is not working
for me. here is the code, so I am referencing the first column that happend to be a templateField contains
Edit, Delete link.. can anyone show me what am I doing wrong....thanks
Bob
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
LinkButton LbDelete;
foreach (GridViewRow rowItem in GridView1.Rows)
{
LbDelete = (LinkButton)(rowItem.Cells[0].FindControl("LbDelete"));
LbDelete.OnClientClick = "return confirm('are you sure to delete')";
}
}
<asp:GridView ID="GridView1" runat="server" DataSourceID="ObjectDataSource1"
AutoGenerateColumns="False"
DataKeyNames="TagId" CellPadding="4" ForeColor="#333333" GridLines="None"
onrowdeleting="GridView1_RowDeleting">
<Columns>
<asp:Templa ...
Go to the complete details ...