Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
How to find Grid view row index value using command argument on button click
Bhupendra Singh
Oct 4 2012 11:39 AM
9.3k
Reply
<asp:TemplateField HeaderText="DELETE" HeaderStyle-CssClass="sfDelete">
<ItemTemplate>
<asp:ImageButton ID="imbDelete" runat="server" CausesValidation="False" CommandArgument="<%# ((GridViewRow) Container).RowIndex %>"
CommandName="Delete" ToolTip="Delete the enquiry" />
</ItemTemplate>
</asp:TemplateField>
Fire Event of grid view row Command..
-------------------------------------------------------------------------------------------------------
protected void gdvRecord_RowCommand(object sender, GridViewCommandEventArgs e)
{
if (e.CommandName == "EDIT")
{
int RowNum = int.Parse(e.CommandArgument.ToString());
}
}
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Process Class in C#
How to convert any type of files to be viewed as HTML in C#.net