Posted by: viralsarvaiya on: August 20, 2009
hear i demonstrate the custom paging of the datagrid or gridview.
in the client side take the datagrid or grid view
here i take the datagrid,
<table>
<tr>
<td>
<asp:datagrid id=”dgMake” runat=”server” AutoGenerateColumns=”False” Width=”100%”
CellPadding=”5″ GridLines=”None” AllowPaging=”true”>
<Columns>
<asp:TemplateColumn>
<HeaderStyle HorizontalAlign=”Left” Width=”100″></HeaderStyle>
<HeaderTemplate>Part</HeaderTemplate>
<ItemStyle HorizontalAlign=”Left” Width=”100″></ItemStyle>
<ItemTemplate><%#Container.DataItem(“part”)%></ItemTemplate>
</asp:TemplateColumn>
<asp:TemplateColumn>
<HeaderStyle HorizontalAlign=”Left”></HeaderStyle>
<HeaderTemplate>Description</HeaderTemplate>
<ItemStyle HorizontalAlign=”Left”></ItemStyle>
<ItemTemplate><%#Container.DataItem(“description”)%></ItemTemplate>
</asp:TemplateColumn>
</Columns>
<PagerStyle Visible=”False”></PagerStyle>
</asp:datagrid>
</td>
</tr>
in the second raw, i add the link buttons as below,
<tr>
<td valign=”top” align=”right” bgcolor=”#e1e4e6″ style=”padding:10px 10px 10px 60px;text-align:right;”>
<asp:linkbutton id=”FirstButton” [...]
Posted by: viralsarvaiya on: March 13, 2009
In this article i will explain a method for providing custom paging for datalist or repeater.
As you know the datalist is a very powerful control with one drawback that it does not have built-in paging capability, a feature the DataGrid offers. to provide paging to datalist or repeater we can either use “PagedDataSource” class, found [...]
Recent Comments