.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

DataGrid with range paging(1-100 101-200 .....)

Posted By:      Posted Date: October 19, 2010    Points: 0   Category :ASP.Net

hai,I have a DataGrid with lot of records......

here my requirement is i need paging like 1-100 101-200 201-300 ..... instead of 1 2 3 4 5 6 ......

How can I get that? 1-100 link will shows first 100 records in the Grid....

Please give ur suggetions.....

View Complete Post

More Related Resource Links

DataGrid Paging not working

I got DataGrid Paging functionality on, I can see the paging 1,2,3,4,5.... but when i try to click on it to go to that page the datagrid just goes blank (does not render any record anything). My code is below: <asp:DataGrid ID="dgArticles" AllowPaging="true" Width="100%" AllowSorting="True" AutoGenerateColumns="False" runat="server" OnPageIndexChanged="dgArticles_PageIndexChanged" PageSize="15" EnableViewState= "true"> <ItemStyle Font-Names="Arial" Font-Size="12px" /> <HeaderStyle Font-Bold="true" ForeColor="#FFFFFF" Font-Names="Arial" Font-Size="14px" BackColor="#B2C1D1" /> <PagerStyle Mode="NumericPages" CssClass="FooterButton" Font-Size="Large" /> <AlternatingItemStyle BackColor="#EAEAEA" /> <Columns> <asp:BoundColumn DataField="ContentID" HeaderText="Content ID" /> <asp:HyperLinkColumn DataTextField="Headline" DataNavigateUrlField="ContentID" DataNavigateUrlFormatString=

Sorting and Paging in DataGrid which is inside asp:wizard



Would it be possible to do Sorting and Paging in a DataGrid, My dataGrid is place inside an asp:wizard which is inside an Update Panel.

<asp:UpdatePanel ID="upEditusr" runat="server">
<asp:Wizard ID="Wizard1" runat="server" CssClass="wizUsrAccess" displaycancelbutton="True" 
              oncancelbuttonclick="OnCancelButtonClick" onfinishbuttonclick="OnFinishButtonClick" OnNextButtonClick="OnNextButtonClick" ActiveStepIndex="0" BorderWidth="1px" DisplaySideBar="false">
               <asp:Label ID="SideBarInfo" OnPreRender="InitSideBarLbl" runat="server" /> 
               <asp:DataList ID="SideBarList" OnPreRender="LoadSideBar" RepeatLayout="Flow" Style="display:none;" runat="server"> 
                       <asp:LinkButton ID="SideBarButton" Visible="false" runat="server"></asp:LinkButton> 
                   <SelectedItemStyle Font-Bold="True"  />            

Run javascript before sorting or paging the datagrid


Here is what I am trying to do;

I want it so that when the user clicks on the datagrid column headers to sort the records, or when they go to page the datagrid, that a confirmation pop-up appears first, confirming that their changes are going to be lost (unless they click "Cancel").

I have the confirmation pop-up scripted in Javascript and is added to the controls on the page using

onClientClick="return ConfirmDiscardChanges();"

How do I attach this to a datagrid header and to the pager?

Do the columns need to be Template columns and the header text being hyperlink?  If so, how do I set it up so it will, if the user clicks "OK" in the confirmation pop-up,  still sort?


AJAX GridView Paging and Sorting using C# in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

GridView Paging Using Ajax in ASP.Net

To enable the GridView Paging and Sorting to update the GridView Data without refreshing the ASP.Net web page AJAX Extension controls are used. UpdatePanel is used to hold the GridView control that triggers the events for the controls placed inside it. By Default UpdatePanel triggers the asynchronous postbacks for its child controls.

Advanced Paging GridView with ASP.NET 2.0/3.5

This is an article about advanced paging GridView with ASP.NET 2.0/3.5. All the HTML, CSS, JavaScript it needs have been embedded into the WizardGridView.dll.

LINQ to SQL Paging using GridView in C# and ASP.NET 3.5

This tutorial will show you how we can extend the LINQ to SQL Class and create methods that will allow us to page data from a SQL database. C# version.

How to format and update GridView and DataGrid rows using JQuery

The behavior described in this question is as expected. When you set text of a cell in grid, it directly affects HTML that is going to be rendered. When you set text value of a cell, it means that you are setting innerText of the cell. The column that GridView creates for command fields (Edit, Delete and Select) are a (anchor) or button elements. So you can see what will happen if you set text value in that cell. It will wipe out those link or button controls and replace them with simple text string.

Creating Paging for a Repeater Control

A common question is "How do I implement paging within a Repeater?" Although the beauty of the Repeater control is its flexibility, you're on your own for building most functions. ASP.NET 2.0 has included some new controls that provide paging, as does the DataGrid in ASP.NET 1.1. However, this tip shows you how to roll your own paging for a simple data viewer.

Use Jquery with repeater, gridview, datagrid

Before we talk about jquery inside any itemtemplate (repeater, gridview, datagrid), we need to understand the basic use of jquery functions

ListBox tricky to set in a DataGrid/GridView

Listboxes are very tricky to set selected items in grid - there is no real nice way to do it. It would have been great if Microsoft included a property that accepts an array or comma separated values - or anything! But they only allow each item in the list to be selected individually. The way to do this in a grid is a bit messy, but it is fairly simple to implement. When a row is created (as per the event), select the items of the listbox as per the datagrid source data:

GridView Sorting/Paging : 'REAL' AJAX with Asp.Net Series

This is a continuation of my 'REAL' AJAX with Asp.Net (not Asp.Net AJAX) series posts for those of us trying to stop relying on Asp.Net 'AJAX'.

Ok, nothing too dramatic to start things off, we are going to make some tabled data sortable and pagable all without using a bit of postback. Not only that, but it is going to be incredibly easy!

How to highlight datagrid or GridView row on mouse over?

This article will show how you can Ajax with GridView to display popup messages when mouse moves over certain column. In the demo project I have added first column as an image column with a help icon in it. This kind of implements a feature that if you want more information about the row you can move mouse over this icon, a asynchronous request is sent to server for data about that row and when call returns the returned message is show as a popup message.

Multiple Column Dropdownlist for the ASP.NET DataGrid

Based on my previous control "Multiple Column DropDownList for ASP.NET", I received many emails asking for the same control to be used in the DataGrid for web applications. Here we go.. This control can be used as the regular MS DropDownList in the DataGrid and also as a regular dropdownlist. It has all the properties, like DataTextField, DataValueField, DataSource, SelectedIndex etc. The download file contains the samples both in VB.NET and C#. In this sample, I have used the Northwind database of SQL Server.

Using the WPF Toolkit DataGrid

WPF comes with a large number of built in controls, but from the beginning it has lacked something that many application developers find extremely important - a DataGrid. You can use the ListView to create something approximating a DataGrid

Manually sorting and paging Gridview without using datasource control

Many a times while working with Gridview we want to work with the paging and sorting functionality without using any datasource control. Gridview is flexible enough to perform these tasks without the use of any datasource control and only a few lines of code.

Optimized Paging and Sorting in ASP.NET GridView

In this article I am going to demonstrate what are the performance drawbacks of using conventional way to page and sort your GridView and then I will demonstrate 'An Optimized way to implement Paging and Sorting'.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend