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
Devendra Kumar
NA
517
244.6k
gridview OnRowCommand edit update row in c#
Jan 17 2017 6:33 AM
inside grid view row command on row command edit update
i want when edit button click then edit button hide and save button visible true
<asp:TemplateField HeaderText="Edit">
<EditItemTemplate>
<asp:LinkButton ID="save" runat="server" CommandName="save1" Text="save" CommandArgument='<%# Eval("orderId") %>'></asp:LinkButton>
</EditItemTemplate>
<ItemTemplate>
<asp:LinkButton ID="edit" runat="server" CommandName="edit1" Text="edit"></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
and code
protected void GridClose_RowCommand(object sender,
GridViewCommandEventArgs
e)
{
if (e.
CommandName
==
"edit1"
)
{
GridViewRow
row = (
GridViewRow
)(((Control)e.CommandSource).NamingContainer);
TextBox
txt_tracking_num = row.FindControl(
"txt_tracking_num"
)
as
TextBox
;
DropDownList
dropdwnlist = row.FindControl(
"dropdwnlist"
)
as
DropDownList
;
LinkButton
lnksave = row.FindControl(
"save"
)
as
LinkButton
;
LinkButton
edit = row.FindControl(
"edit"
)
as
LinkButton
;
txt_tracking_num.Visible =
true
;
dropdwnlist.Visible =
true
;
lnksave.Visible =
true
;
}
lnksave.Visible =
true
;
this is not valid show in error
Reply
Answers (
6
)
web method is not working 404 not found
How To create multiple pdf generate??