Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 12th, 2004, 01:34 PM
Authorized User
 
Join Date: Sep 2004
Location: Belfast, , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default Datagrid paging in userControl

Hi all,


 I have a WebForms datagrid on my site but it is running under userControl that generates into one of the cells of the table on the main page (index.aspx) this works fine. Recently there has been too much stuff added to the database and I wanted to add paging to the datagrid. So I did but now when i click the second page my site refreshes but the whole userControl is missing

I am sure this has to do something with the user control?

Can anybody help?



  #2 (permalink)  
Old October 12th, 2004, 03:52 PM
Authorized User
 
Join Date: Oct 2004
Location: sp, sp, Brazil.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

1 can you please post the number of records by page and how many records you have(total)?

2 when you page, are you using 'datagrid paging' or 'manual paging'(your code)?

3 is viewstate enabled?

4 can you run your control in another page, i mean a page using only your control?

5 did ever try to limit , test only , the numbers of records?

wagner reatto
  #3 (permalink)  
Old October 13th, 2004, 07:15 AM
Authorized User
 
Join Date: Sep 2004
Location: Belfast, , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi

1 I have about 20 records in grid total (but this ma rise) the PageSize is set to 10
2 How can you set this? however I have a code in the dgResults_PageIndexChanged
that does the job But if there is a automatic way of doing this let me know how
3 Enable ViewState = True
4 Yes If I run it on another page itself it works OK
5 no

I think that the problem is in the main page somwhere because If i put a breakpoint on the dgResults_PageIndexChanged event it never really gets there...
I am showing the control on the main page from code like this:


        If Not Page.IsPostBack Then
            '# ONLY IF NOT ISPOSTBACK
            controlEvents = Page.LoadControl("UserControls/Events.ascx")
            pageContensCell.Controls.Add(controlEvents)

        End If

Do you think this could have somthing to do with it?

I have one Cell in a table on the main page and I render all of the controls into this cell...


  #4 (permalink)  
Old October 13th, 2004, 07:40 PM
Authorized User
 
Join Date: Oct 2004
Location: sp, sp, Brazil.
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you please put your code out "If Not Page.IsPostBack Then"?

wagner reatto
  #5 (permalink)  
Old October 14th, 2004, 03:29 AM
Authorized User
 
Join Date: Sep 2004
Location: Belfast, , .
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Yeah that was it thanks a milion...

I was looking for the error in the control itself...


:D

 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Custom paging in Datagrid with datagrid page count madhusrp ASP.NET 1.0 and 1.1 Professional 12 June 2nd, 2008 01:15 PM
UserControl in DataGrid kdkcchoco ASP.NET 1.0 and 1.1 Professional 7 January 23rd, 2007 04:38 PM
DataGrid Paging nsrujan C# 0 February 6th, 2006 09:12 AM
usercontrol in datagrid flickerslair ASP.NET 1.0 and 1.1 Basics 0 January 5th, 2006 11:59 AM
Paging in datagrid Renu ASP.NET 1.0 and 1.1 Basics 2 September 9th, 2004 01:11 PM



All times are GMT -4. The time now is 08:16 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.