I am new to ASP.Net and I am trying to figure out why the edit event won't fire for me.
I have a datagrid on a page and I want the user to be able to edit some of the fields. so I have an edit button and in the cod e I have an edit event sub and I have it declared in my html also.
here is my code
Here is what I have in the html part
I have a label on the page to see even if the edit event is firing and it isn't can someone help me. Thanks
To go where no programmer has gone before.
I have a datagrid on a page and I want the user to be able to edit some of the fields. so I have an edit button and in the cod e I have an edit event sub and I have it declared in my html also.
here is my code
Code:
Sub dgRed_Edit(ByVal sender As System.Object, ByVal e As DataGridCommandEventArgs) Handles dgRed.EditCommand
lblTest.Text = "Click: Detected"
dgRed.EditItemIndex = e.Item.ItemIndex
adpRed.Fill(DsDirec1, "tblDirectorCommentsRed")
dgRed.DataBind()
End Sub
HTML:
<asp:DataGrid id=dgRed style="Z-INDEX: 101" runat="server" ForeColor="Red" BorderColor="#999999" BorderStyle="Solid" BorderWidth="1px" BackColor="White" CellPadding="3" GridLines="Vertical" DataSource="<%# DsDirec1 %>" DataMember="tblDirectorCommentsRed" AutoGenerateColumns="False"
OnEditCommand="dgRed_Edit" >
To go where no programmer has gone before.