EditCommandColumn

R

rn5a

Consider the following DataGrid:

<asp:DataGrid 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>

</asp:DateGrid>

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,982
Messages
2,570,185
Members
46,737
Latest member
Georgeengab

Latest Threads

Top