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
mohd sajid
NA
9
15.1k
gridview paging without postback
May 3 2013 8:55 AM
I have gridview with data ,imagebutton(view,edit and delete). how to applying paging to gridview without postback. I tried with update panel,it worked for paging but event associated with imagebutton were not working. Exactly speaking, image button events are working , but not showing any effect.
<asp:GridView ID="gvSalesSubCategory" runat="server" AutoGenerateColumns="false"
HeaderStyle-BackColor="#E5E5E5" AlternatingRowStyle-BackColor="#F3F3F3"
CellPadding="1" Style="" HeaderStyle-Height="2px" AlternatingRowStyle-Height="10px"
DataKeyNames="SalesBySubCategoryID"
onpageindexchanging="gvSalesSubCategory_PageIndexChanging"
onrowcommand="gvSalesSubCategory_RowCommand"
onrowdeleting="gvSalesSubCategory_RowDeleting"
onrowediting="gvSalesSubCategory_RowEditing" PageSize="5" AllowPaging="True"
onrowcreated="gvSalesSubCategory_RowCreated" Width="700px" >
<Columns >
<asp:BoundField DataField="SLNO" HeaderText="SLNO" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="BranchName" HeaderText="Branch Name" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="MainCategoryName" HeaderText="Main Category" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField DataField="SalesDate" HeaderText="Sales Date" ItemStyle-HorizontalAlign="Center"/>
<asp:TemplateField ItemStyle-HorizontalAlign="Center" >
<ItemTemplate>
<asp:ImageButton ID="ibtnView" runat="server" ImageUrl="~/images/hammer_screwdriver.png"
ToolTip="View" CommandName="View" CommandArgument='<%#((GridViewRow)Container).RowIndex %>'
CausesValidation="false" />
<asp:ImageButton ID="ibtnEdit" runat="server" ImageUrl="~/images/pencil.png" ToolTip="Edit"
CommandName="Edit" CommandArgument='<%#((GridViewRow)Container).RowIndex %>'
CausesValidation="false" />
<asp:ImageButton ID="ibtnDelete" runat="server" ImageUrl="~/images/cross.png" ToolTip="Delete"
CommandName="Delete" CommandArgument='<%#((GridViewRow)Container).RowIndex %>'
CausesValidation="false" OnClientClick="return confirm('Are you Sure to Delete?');" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Respond , if you have a answer.
Thanks
Reply
Answers (
1
)
Nested Grid view
Regarding html Images click event