﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>InstantASP Community Forums / General Discussion / General Chit-Chat  / Paging / Latest Posts</title><generator>InstantForum.NET v4.1.4</generator><description>InstantASP Community Forums</description><link>http://community.instantasp.co.uk/</link><webMaster>sales@instantasp.co.uk</webMaster><lastBuildDate>Mon, 01 Dec 2008 16:33:15 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Paging</title><link>http://community.instantasp.co.uk/Topic7086-23-1.aspx</link><description>&lt;STRONG&gt;&lt;FONT color=#111199&gt;Go to ItemEvents of Data Grid control that is located at top of the property page.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;Create an event for paging .Inside the event write the following code.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;MyDataGrid.CurrentPageIndex=e.NewPageIndex; &lt;BR&gt;   BindGrid(); &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;BindGrid ()is a method which will populate date in datagrid from Database.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;Then rightclick on datagrid go to property builder &lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;  Go to Paging&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;  check the allow paging check box.&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;FONT color=#111199&gt;Set the property for number of records you want to dispaly.&lt;/FONT&gt;&lt;/STRONG&gt;</description><pubDate>Thu, 06 Oct 2005 03:01:40 GMT</pubDate><dc:creator>Sanat</dc:creator></item><item><title>RE: Paging</title><link>http://community.instantasp.co.uk/Topic7086-23-1.aspx</link><description>You want to do the paging on the dataset itself or in the stored procedure? The problem with paging in a dataset is that all the data is returned from the server and loaded in memory now. The upside is that you can sort it anyway you like.&lt;/P&gt;&lt;P&gt;I personally prefer to do the paging in the stored procedure. Here is the general concept that I do in my paging queries:&lt;/P&gt;&lt;P&gt;Procedure GetJournals&lt;BR&gt;@groupID  INT,&lt;BR&gt;@Begin     INT,&lt;BR&gt;@End       INT&lt;BR&gt;AS&lt;/P&gt;&lt;P&gt;--Create temp table as follows:&lt;BR&gt;CREATE TABLE #tmp&lt;BR&gt;(&lt;BR&gt; UID INT IDENTITY,&lt;BR&gt; JournalID INT&lt;BR&gt;)&lt;/P&gt;&lt;P&gt;INSERT INTO&lt;BR&gt;  #tmp (JournalID)&lt;BR&gt;SELECT JournalID FROM Journals WHERE GroupID = @GroupID&lt;/P&gt;&lt;P&gt;SELECT Journals.* FROM Journals INNER JOIN #tmp ON #tmp.JournalID = Journals.JournalID WHERE #tmp.ID BETWEEN @Begin AND @End</description><pubDate>Sat, 04 Jun 2005 16:36:18 GMT</pubDate><dc:creator>fadi</dc:creator></item><item><title>Paging</title><link>http://community.instantasp.co.uk/Topic7086-23-1.aspx</link><description>Hello all,&lt;br&gt;&lt;br&gt;I've been doing some research in paging a datalist / datagrid.  Anyone have any tips or methods that you've determined to work the best?</description><pubDate>Sat, 04 Jun 2005 09:42:01 GMT</pubDate><dc:creator>Bare</dc:creator></item></channel></rss>