473,508 Members | 2,384 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Datagrid Paging

hi
I got a datagrid with Paging enabled which is getting populated thru a
stored proc.

I've given the code in the event

grid.CurrentPageIndex = e.NewPageIndex
grid.VirtualItemCount = //COUNT FROM STORED PROC
grid.Datasource =a;
grid.DataBind();

but the paging is not working correctly.The link for the paging ( even if it
is page number or 'Prev Next" ) gives the link of the start page( the inital
pageload condition )

ie javascript:__doPostBack('grid$_ctl1$_ctl0','') and
javascript:__doPostBack('grid$_ctl1$_ctl1','') for Prev and Next links
always

What should i do more to make the link work

Thanks in advance

Nov 18 '05 #1
4 1821
Hi Happy..
Can you try posting some code where the error is?
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #2
hi,

The code logic that i've used is : in the stored proc i'm getting the table
data into a temporary table and getting the excat no: of rows to the .net
application. ( the same logic for paging).

and ive given the code behid as ( in the pageindex change event )

grid.CurrentPageIndex = e.NewPageIndex
//count as an output parameter from stored proc
grid.VirtualItemCount = COUNT
grid.Datasource =dataset;
grid.DataBind();

BTW i'm using EnableViewState=false for the datagrid.

Thanks

"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:eS*************@TK2MSFTNGP12.phx.gbl...
Hi Happy..
Can you try posting some code where the error is?
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 18 '05 #3
hi
ive found out that if in the grid ViewState is enabled then it is working
fine. but when i disable it i have to populate it in the pageload again ( IF
isPostBack ).
ie 2 consicutive LoadGrid call.

Is ther any workaround for this.
how can i use paging with viewstate disabled

Thanks
"Happy" <ha***@nospam.com> wrote in message
news:O#**************@TK2MSFTNGP14.phx.gbl...
hi,

The code logic that i've used is : in the stored proc i'm getting the table data into a temporary table and getting the excat no: of rows to the .net
application. ( the same logic for paging).

and ive given the code behid as ( in the pageindex change event )

grid.CurrentPageIndex = e.NewPageIndex
//count as an output parameter from stored proc
grid.VirtualItemCount = COUNT
grid.Datasource =dataset;
grid.DataBind();

BTW i'm using EnableViewState=false for the datagrid.

Thanks

"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:eS*************@TK2MSFTNGP12.phx.gbl...
Hi Happy..
Can you try posting some code where the error is?
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 18 '05 #4
Hi Happy,
Try looking at this article it will give u an idea how pagination
WORKS..
Its at :- http://www.microsoft.com/india/msdn/articles/60.aspx
Be happy Mr Happy..
Enjoy!
Patrick

"Happy" wrote:
hi
ive found out that if in the grid ViewState is enabled then it is working
fine. but when i disable it i have to populate it in the pageload again ( IF
isPostBack ).
ie 2 consicutive LoadGrid call.

Is ther any workaround for this.
how can i use paging with viewstate disabled

Thanks
"Happy" <ha***@nospam.com> wrote in message
news:O#**************@TK2MSFTNGP14.phx.gbl...
hi,

The code logic that i've used is : in the stored proc i'm getting the

table
data into a temporary table and getting the excat no: of rows to the .net
application. ( the same logic for paging).

and ive given the code behid as ( in the pageindex change event )

grid.CurrentPageIndex = e.NewPageIndex
//count as an output parameter from stored proc
grid.VirtualItemCount = COUNT
grid.Datasource =dataset;
grid.DataBind();

BTW i'm using EnableViewState=false for the datagrid.

Thanks

"Patrick Olurotimi Ige" <pa*********@crazyjohns.com.au> wrote in message
news:eS*************@TK2MSFTNGP12.phx.gbl...
Hi Happy..
Can you try posting some code where the error is?
Patrick
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!



Nov 18 '05 #5

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

Similar topics

2
3557
by: RelaxoRy | last post by:
sqlConnection1.Open(); myReader = sqlCommand1.ExecuteReader(); DataGrid1.DataSource = myReader; DataGrid1.DataBind(); myReader.Close(); sqlConnection1.Close(); The Datagrid populates fine. ...
3
8673
by: Joseph D. DeJohn | last post by:
I am trying to get pagination working on a datagrid. Can anyone point me to a resource for help on this? I'm not sure if custom paging is the best option or not.
2
2227
by: enak | last post by:
I can not get my datagrid to page. I have a datagrid that I can sort 2 of the columns. This works great. I added paging and when I display the dg it shows 5 pages. (I am showing page numbers at...
2
2567
by: RJN | last post by:
Hi Sorry for posting again. I have a datagrid which is put inside a div tag to make it scrollable. I need to page the datagrid. The page numbers appear at the bottom of the datagrid and has...
6
1801
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...
5
1661
by: quanga | last post by:
Hi- I have a datagrid that in some cases can be several thousand rows in length. What I'd like it to do is have the data pushed to the browser after every, say, 100 rows or so. Kind of a...
2
1841
by: Axel Dahmen | last post by:
Hi, I'm using a DataGrid control to show a table's content with paging. For navigation through the pages I'm using the DataGrid's intrinsic navigation section. My problem: The DataGrid...
5
2756
by: tshad | last post by:
Is there a way to carry data that I have already read from the datagrid from page to page? I am looking at my Datagrid that I page through and when the user says get the next page, I have to go...
0
1330
by: Pat | last post by:
I have 3 Datagrid nested. Master Details Child The master has paging (And i'm using the paging inbuilt in the Datagrid) in the Master DataGrid you select a linkbutton(using commandname) and it...
3
1815
by: Pat | last post by:
I have a 2 nested Datagrid. When i select a row in the Master Datagrid i populate the Child databrid using myDataGrid.SelectedIndex value as the filter and setting the DataKeyField. I enabled...
0
7223
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
7115
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
7321
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
7377
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7036
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...
1
5047
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4705
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1547
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
414
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.