Click here to Skip to main content
16,020,249 members
Please Sign up or sign in to vote.
1.09/5 (3 votes)
See more:
hi,
pls help me
my gridview having edit and delete buttons but rowcommand event is not firing on the codebehind even i wrote the command arguement and command name.
thank u
Posted
Updated 21-Jul-18 2:06am
Comments
Vincent Maverick Durano 23-Jul-18 0:25am    
Please be more specific when asking questions next time so we can easily assist you. Please read this article: https://www.codeproject.com/Articles/1252451/Programming-Problems-and-Finding-Solutions

I think on your .aspx onrowrowcommand="YourEventName" is not updated..Please check and update it manually..
 
Share this answer
 
thank u for u all
i found the solution that is because of postback it is not fired.
 
Share this answer
 
Comments
[no name] 10-Feb-14 6:07am    
I've given OnRowCommand="grdAccount_RowCommand" also and below given code also. But its not firing event.

<asp:TemplateField HeaderText="VotableShares" HeaderStyle-HorizontalAlign="Left">
<itemtemplate>
<asp:LinkButton ID="lnkVoteShare" runat="server" Text='<%#Bind("VotableShares") %>'
usesubmitbehavior="true" CommandName="VoteShare" CommandArgument='<%#Bind("VotableShares") %>'
ForeColor="#3399ff">


XML
I've given OnRowCommand="grdAccount_RowCommand" also and below given code also. But its not firing event.

<asp:TemplateField HeaderText="VotableShares" HeaderStyle-HorizontalAlign="Left">

                                                    <asp:LinkButton ID="lnkVoteShare" runat="server" Text='<%#Bind("VotableShares") %>'
                                                        usesubmitbehavior="true" CommandName="VoteShare" CommandArgument='<%#Bind("VotableShares") %>'
                                                        ForeColor="#3399ff">
 
Share this answer
 
check viewstate status try this code in web.config
<pages validateRequest="false" enableEventValidation="false" viewStateEncryptionMode ="Never" />
 
Share this answer
 
Comments
Richard Deeming 23-Jul-18 13:34pm    
Asked, answered, and solved SEVEN YEARS AGO.

Stick to answering recent questions.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900