473,396 Members | 2,109 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PAGING not working in ASP DataGrid

Hi There. . I need some help in paging (which is not working) in
ASP:DATAGRID

My Data source id is a function which returns DataTable to this
datagrid.
Do i need a code behind to get the next page working?

thanks for help.

this is how my data grid look like:

<asp:datagrid
ID="GridView"
DataSourceID="ObjectDataSource"
DataKeyField="id"

AllowSorting="True"
runat="server"
AutoGenerateColumns="false"

OnSelectedIndexChanged="GridView_SelectedIndexChan ged"
AllowPaging="True" PageSize="5"
PagerStyle-Mode="NumericPages"
>
Mar 12 '07 #1
2 6544
When you say it isn't working - exactly what do you mean?
Are you getting an error?

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com

"getziiiiiiiiiii" <ha************@gmail.comwrote in message
news:11**********************@n33g2000cwc.googlegr oups.com...
Hi There. . I need some help in paging (which is not working) in
ASP:DATAGRID

My Data source id is a function which returns DataTable to this
datagrid.
Do i need a code behind to get the next page working?

thanks for help.

this is how my data grid look like:

<asp:datagrid
ID="GridView"
DataSourceID="ObjectDataSource"
DataKeyField="id"

AllowSorting="True"
runat="server"
AutoGenerateColumns="false"

OnSelectedIndexChanged="GridView_SelectedIndexChan ged"
AllowPaging="True" PageSize="5"
PagerStyle-Mode="NumericPages"
>

Mar 12 '07 #2
On Mar 12, 2:10 pm, "David Wier" <david_w...@noSpamhotmail.comwrote:
When you say it isn't working - exactly what do you mean?
Are you getting an error?

--
David Wier
MVP/ASPInsiderhttp://aspnet101.comhttp://aspexpress.com

"getziiiiiiiiiii" <harpalsherg...@gmail.comwrote in message

news:11**********************@n33g2000cwc.googlegr oups.com...
Hi There. . I need some help in paging (which is not working) in
ASP:DATAGRID
My Data source id is a function which returns DataTable to this
datagrid.
Do i need a code behind to get the next page working?
thanks for help.
this is how my data grid look like:
<asp:datagrid
ID="GridView"
DataSourceID="ObjectDataSource"
DataKeyField="id"
AllowSorting="True"
runat="server"
AutoGenerateColumns="false"
OnSelectedIndexChanged="GridView_SelectedIndexChan ged"
AllowPaging="True" PageSize="5"
PagerStyle-Mode="NumericPages"- Hide quoted text -

- Show quoted text -

In the PageIndexChanging event, set the PageIndex of the grid to be
e.NewPageIndex.
Mar 13 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Stephen | last post by:
This is a real brain-teaser and i'd really appreciate it if someone can try and understand what im trying to do and give me a few pointers or ideas to help me work out my problem. Im basically...
2
by: Hajime Kusakabe | last post by:
Hi. I have created a datagrid (datagrid1) without any columns on a aspx page. Then aspx.vb adds columns from a database. It is somthing like this .... ================================== Dim...
1
by: Maziar Aflatoun | last post by:
Hi, I have a Datagrid with AllowPaing property set so that the two arrows for the next and previous set of rows are showing. This is working fine. Now is there a way to instead of the 2...
3
by: Andrew Banks | last post by:
I've added a data grid to my page but the automatic paging feature doesn't seem to be working. The code I have on page load is as follows. Can anyone suggest why this isn't working? ...
5
by: Patrick.O.Ige | last post by:
Hi Guys, I have a datagrid wit editing and updating. But after adding Paging IT WON'T PAGE!! It compiles well but when i click on the paging link it doesn't go to the next link.. When i remove...
6
by: Shawn | last post by:
Hi. I already have a datagrid where I'm using paging. I have a stored procedure that fills a temp table with 200-500 rows and then sends back 10 records at the time. When I go to page 2 the SP...
2
by: asad | last post by:
Hello friends, i am designing a ASP.NET page where i want to use custom paging bcoz data is too heavy so pls tell me how can i use custom paging in ASP.NET Thanks
0
by: ashish.dwivedi1 | last post by:
Hi, I am building a ASP .NET composite control containing a datagrid during which I am finding a problem while paging of the grid. The problem is for example if I am having three pages to be...
2
by: rn5a | last post by:
In a shopping cart app, a ASPX page retrieves the order details & personal details of a user from a MS-Access database table depending upon the username of the user. The order details of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.