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
Resmi Satish
NA
110
75.5k
How to get imagebuttonId in a gridview using jquery
Jul 4 2013 6:04 AM
I am having an image button which has been placed inside a gridview.
Please find below my grid view :
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
<asp:UpdatePanel runat="server" ID="UP">
<asp:GridView ID="ExpensesGridView" runat="server" AutoGenerateColumns="False"
BorderColor="#004B9D" BorderStyle="Solid" BorderWidth="1px"
CellPadding="4" ShowFooter="True"
DataKeyNames="TimesheetId" Width="700px"
onsorting="ExpensesGridView_Sorting" CssClass="Gvplacement">
<asp:TemplateField HeaderText="Select for Approval" ItemStyle-HorizontalAlign="Center">
<ItemTemplate>
<asp:CheckBox ID="chkApprove" runat="server" />
</ItemTemplate>
<FooterTemplate>
Approve:</FooterTemplate>
<FooterStyle HorizontalAlign="Center" />
<ItemStyle HorizontalAlign="Center" />
</asp:TemplateField>
<ItemStyle HorizontalAlign="Center" />
<FooterTemplate>
<asp:ImageButton ID="btnApprove" runat="server" ToolTip="Click to approve selected expenses"
ImageUrl="~/App_Themes/Default/Images/buttons/icon_16x16_tick.gif" AlternateText="Approve"
CommandName="Approve" />
</FooterTemplate>
<FooterStyle HorizontalAlign="Center" />
</asp:TemplateField>
</GridView >
</ContentTemplate>
</asp:UpdatePanel>
As I am new to jquery,I am not able to get the buttonId.
I have to create a jquery function which will be called when we click the image button.
Purpose of the function:
Check if any check box is selected and if so , an alert message has to be displayed.
Reply
Answers (
6
)
Control key manipulation using Javascript/ Jquery
Exporting data to excel file using jquery along with css?