Hi,
I have a delete button in the item template of my datagrid, when I click it
the function for the Insert button is executed instead of the delete button.
When I step through in debug, the doAction function is never entered. Below
is my code. Do you see any errors? Thanks, Andy
<asp:datagrid id="dgdANSI835 " runat="server" OnItemCommand=" doAction"
ShowFooter="Fal se" Font-Names="verdana" BorderColor="#C CCC99"
BackColor="#CCC C99" Font-Size="8pt" AutoGenerateCol umns="False"
DataKeyField="i nfo_id" >
.....
<asp:TemplateCo lumn>
<HeaderTemplate >
<asp:LinkButt on CommandName="In sert" Text="Add" ID="btnAdd" Runat="server" />
</HeaderTemplate>
<ItemTemplate >
<asp:Button CommandName="De lete" Text="Del" ID="btnDelete"
Runat="server"> </asp:Button>
</ItemTemplate>
</asp:TemplateCol umn>
.....
public void doAction(object sender, DataGridCommand EventArgs e)
{
if (e.CommandName == "Insert")
{
dgdANSI835.Show Footer=true;
}
if (e.CommandName == "Delete")
{
DeleteRow();
}
}
--
Message posted via DotNetMonster.c om
http://www.dotnetmonster.com/Uwe/For...p-net/200506/1