Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / DataGrid / April 2004

Tip: Looking for answers? Try searching our database.

Paging Problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Wesley Robinson - 08 Apr 2004 14:22 GMT
I am having problems getting paging to work on one of my datagrid controls.
I am developing in Visual Studio.NET and I have tried using both the built
in MyDatagrid_PageIndexChanged event and tried making my own function and
calling it with the onpageindexchanged attribute of the datagrid element.
In either case, it never calls the function and simply reloads the page and
my datagrid vanishes.  I am creating the datagrid dynamically by selecting a
table from a dropdown list then selecting what fields I want from a listbox
and hitting a select button.  I am stumped.  Does anyone have any ideas on
what I might be missing?

Thanks,
Wesley
Ian Oldbury - 08 Apr 2004 20:46 GMT
Hi Wesley

Does you codebehind page have the handles reference?

  Private Sub grdPLOFDetail_PageIndexChanged(ByVal source As System.Object,
ByVal e As System.Web.UI.WebControls.DataGridPageChangedEventArgs) Handles
grdPLOFDetail.PageIndexChanged

And in the aspx file within the datagrid
have
allowpaging="True"

ian

> I am having problems getting paging to work on one of my datagrid controls.
> I am developing in Visual Studio.NET and I have tried using both the built
[quoted text clipped - 8 lines]
> Thanks,
> Wesley
Wesley Robinson - 08 Apr 2004 21:23 GMT
My code behind has the handles reference and allow paging is set to true.  I
haven't had a problem setting up paging before, but for some reason in this
instance, when I select a page from the page index, it just calls Page_Load
but doesn't call the _PageIndexChanged function.

Thanks

> Hi Wesley
>
[quoted text clipped - 26 lines]
> > Thanks,
> > Wesley
Wesley Robinson - 13 Apr 2004 19:20 GMT
I think I've narrowed down (or perhaps broadened ) my problem to this, when
AutoGenerateColumns is set to False, I lose my datagrid whenever the page
executes a postback.  When AutoGenerateColumns is set to True, I don't have
any problems but I need to be able to set AutoGenerateColumns = False.

> I am having problems getting paging to work on one of my datagrid controls.
> I am developing in Visual Studio.NET and I have tried using both the built
[quoted text clipped - 8 lines]
> Thanks,
> Wesley

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.