R
rn5a
Consider the following DataGrid:
<aspataGrid ID="dgCart" OnEditCommand="Cart_EditCommand"
OnItemCommand="Cart_ItemCommand"....AllowSorting=true........>
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<asp:LinkButton ID="lnkProdID" CommandArgument="ProdID"...../>
</HeaderTemplate>
<ItemTemplate>
............
</ItemTemplate>
<%-- A few more TemplateColumns as shown above come here --%>
<asp:EditCommandColumn EditText="EDIT"/>
</Columns>
</aspateGrid>
If I am not mistaken, when any Button within the DataGrid other than
the EDIT Button is clicked, the ItemCommand event gets raised & when
the EDIT Button is clicked, ONLY the EditCommand event gets raised;
the ItemCommand event doesn't get fired when the EDIT Button is
clicked..
But what I find is when I click the EDIT Button, first the ItemCommand
event fires & then the EditCommand event fires!
What I would like to know is when the EDIT Button is clicked, does the
ItemCommand event also get raised along with the EditCommand event?
Note that the Headers are LinkButtons for which the ItemCommand is
included within the DataGrid tag.
<aspataGrid ID="dgCart" OnEditCommand="Cart_EditCommand"
OnItemCommand="Cart_ItemCommand"....AllowSorting=true........>
<Columns>
<asp:TemplateColumn>
<HeaderTemplate>
<asp:LinkButton ID="lnkProdID" CommandArgument="ProdID"...../>
</HeaderTemplate>
<ItemTemplate>
............
</ItemTemplate>
<%-- A few more TemplateColumns as shown above come here --%>
<asp:EditCommandColumn EditText="EDIT"/>
</Columns>
</aspateGrid>
If I am not mistaken, when any Button within the DataGrid other than
the EDIT Button is clicked, the ItemCommand event gets raised & when
the EDIT Button is clicked, ONLY the EditCommand event gets raised;
the ItemCommand event doesn't get fired when the EDIT Button is
clicked..
But what I find is when I click the EDIT Button, first the ItemCommand
event fires & then the EditCommand event fires!
What I would like to know is when the EDIT Button is clicked, does the
ItemCommand event also get raised along with the EditCommand event?
Note that the Headers are LinkButtons for which the ItemCommand is
included within the DataGrid tag.