TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Narasiman nar
NA
64
22.1k
The GridView fired event RowEditing which wasn't handled.
Jun 1 2018 2:32 AM
I have gridview as follows
ID Name Season Actions
14756 Test1 2018 Edit Delete
22089 Test2 2018 Edit Delete
33571 Test3 2018 Edit Delete
17912 Test4 2018 Edit Delete
When i click the edit link button in the first row it will redirect to farmermasterpage but when i click edit link button in the third row it does not redirect to farmermasterpage.
Edit code as follows
if (e.CommandName == "Edit")
{
Response.Redirect("~/ivorycoast/farmermaster.aspx?action=edit&farmercode=" + e.CommandArgument.ToString() ,false);
}
Gridview source .aspx page code as follows
<asp:TemplateField HeaderText="Actions">
<ItemTemplate>
<asp:LinkButton ID="lnkEdit" runat="server" ToolTip="Click to edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "farmerctscode") %>' CommandName="Edit" OnCommand="onCommand"></asp:LinkButton>
|
<asp:LinkButton ID="lnkDelete" runat="server" ToolTip="Click to edit" CommandArgument='<%# DataBinder.Eval(Container.DataItem, "farmerctscode") %>' CommandName="Delete" OnCommand="onCommand"></asp:LinkButton>
</ItemTemplate>
when i run the above code shows error as follows
The GridView 'grdFarmerList' fired event RowEditing which wasn't handled.
Note : for response.redirect i added false.
Response.Redirect("~/ivorycoast/farmermaster.aspx?action=edit&farmercode=" + e.CommandArgument.ToString() ,false);
what is the mistake in my above code.
Reply
Answers (
1
)
for gridview some row it does not redirect to next page
How to debug Visual studio methods using postman hit of send