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: July 27, 2009
Pre-requisites
Your project or website must be ASP.NET AJAX enabled website. Because we are going to add the GridView in an UpdatePanel. So your GridView control will be look smart without unnecessary postbacks. You need to create a Customer Table with 6 columns for Customer Code[Code], Name[Name], Gender[Gender], City[City], State[State] and Customer Type[Type], with your desired [...]
Posted by: viralsarvaiya on: July 13, 2009
1. Datagrid has paging while Datalist doesnt.
2. Datalist has a property called repeat. Direction = vertical/horizontal. (This is of great help in designing layouts). This is not there in Datagrid.
3. A repeater is used when more intimate control over html generation is required.
4. When only checkboxes/radiobuttons are repeatedly served then a checkboxlist or radiobuttonlist are [...]
Recent Comments