Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Re: Custom paging

    Another option for custom paging is

    1. Get all the primary key column values in the page load event.
    2. Store these values in the session cache as a separate data set.
    3. The above data set will have one column that has the values of the
    primary key in the interval of the page size.
    4. When a new page is requested, Get the starting primary key value for that
    page from the session and then hit the database to get the records.

    I hope this helps you


    --
    Saravana
    Microsoft India Community Star,
    MCAD,SE,SD,DBA.


    "sampriti" <sampritivaram@hotmail.com> wrote in message
    news:090101c34633$48d486f0$a001280a@phx.gbl...
    > Hi,
    > I am implementing custom pagination on my datagrid to
    > retrieve only desired no of records. For this I am
    > creating temporary table with identity column and
    > inserting rows from the query into temporary table within
    > the storedprocedure. I retrieve the rows from temporary
    > table by passing startingID and Ending ID to the stored
    > procedure. I set rowcount to EndingID and query the
    > temporary table by specifying where condition (rowNum
    > (which is identity field)> StartingID)
    >
    > The results will vary for each user as it is a search
    > application. But the problem is the ASP.NET account pools
    > the different users of the application into a small set of
    > connections to SQL Server. 500 users only translates to
    > roughly 5 connections in SQL Server. There is no way to
    > differentiate between user a and user b on the SQL Server
    > side. All connections to SQL Server use a single account
    > (what is defined in web.config). So, using a temporary
    > table may be a problem.
    >
    > Is there a way to solve this problem?

    Saravana Guest

  2. Similar Questions and Discussions

    1. Custom Paging Possible?
      Hi, I'd like to replace a DataGrid's paging hyperlinks with my own. Is this possible? TIA, Axel Dahmen
    2. Custom Paging in datagrid
      hi all, i have tried implementing custom paging using the example from 4 guys from rolla....however example doesnot work as desired.....i.e when...
    3. custom paging in ASP.NET
      Hello friends, i am using Datagrid builtin paging and it working well but i want to use custom paging bcoz data is too heavy so pls tell me how can...
    4. Custom Paging Question
      Greetings, I have a problem that I am trying to work through. Any help would be appreciated. I have an asp.net application that uses...
    5. Custom Paging Efficiency
      Hello, I'm trying to implement custom paging. At the moment I can get the first page to display. When I click on the number 2 it takes forever to...
  3. #2

    Default custom paging

    Hi,

    I implement datagrid for my customer database regular paging.
    I want to change the paging so that it display the letters A...Z which are
    the first letter of the
    customer names...
    When the users clicks on the letter 'K' I want to display all the customers
    where the first letter is 'K'

    The store proc always returns all the customers...

    does anyone has a sample code where I can get started.
    I appreciate any help.

    - Kilic


    Kilic Beg Guest

  4. #3

    Default Re: custom paging

    The simpleist solution I can think of, is to have 26 link buttons at the top of the datagrid (not exactly part of the datagrid), each has a commandargument set to the letter it designates. Let all of them work off the same "command" handler. In this handler, get the commandargument, and rebind the data accordingly to the datagrid. This really isn't paging, but you could at this point enable paging on your datagrid, so they could page through the results for each letter. Fun Fun


    "Kilic Beg" <kbeg@salary.com> wrote in message news:ucL$KVZSEHA.3016@tk2msftngp13.phx.gbl...
    > Hi,
    >
    > I implement datagrid for my customer database regular paging.
    > I want to change the paging so that it display the letters A...Z which are
    > the first letter of the
    > customer names...
    > When the users clicks on the letter 'K' I want to display all the customers
    > where the first letter is 'K'
    >
    > The store proc always returns all the customers...
    >
    > does anyone has a sample code where I can get started.
    > I appreciate any help.
    >
    > - Kilic
    >
    >
    Raterus Guest

  5. #4

    Default Re: custom paging

    Here is the example for your requirement.
    [url]http://www.codeproject.com/aspnet/LetterBasedPaging.asp[/url]

    --
    Saravana
    Microsoft MVP - ASP.NET
    [url]www.extremeexperts.com[/url]



    "Kilic Beg" <kbeg@salary.com> wrote in message
    news:ucL$KVZSEHA.3016@tk2msftngp13.phx.gbl...
    > Hi,
    >
    > I implement datagrid for my customer database regular paging.
    > I want to change the paging so that it display the letters A...Z which are
    > the first letter of the
    > customer names...
    > When the users clicks on the letter 'K' I want to display all the
    customers
    > where the first letter is 'K'
    >
    > The store proc always returns all the customers...
    >
    > does anyone has a sample code where I can get started.
    > I appreciate any help.
    >
    > - Kilic
    >
    >

    Saravana [MVP] Guest

  6. #5

    Default Re: custom paging

    thanks for your help guys...
    "Saravana [MVP]" <saravank@sct.co.in.nospam> wrote in message
    news:uYR8hEgSEHA.1372@TK2MSFTNGP10.phx.gbl...
    > Here is the example for your requirement.
    > [url]http://www.codeproject.com/aspnet/LetterBasedPaging.asp[/url]
    >
    > --
    > Saravana
    > Microsoft MVP - ASP.NET
    > [url]www.extremeexperts.com[/url]
    >
    >
    >
    > "Kilic Beg" <kbeg@salary.com> wrote in message
    > news:ucL$KVZSEHA.3016@tk2msftngp13.phx.gbl...
    > > Hi,
    > >
    > > I implement datagrid for my customer database regular paging.
    > > I want to change the paging so that it display the letters A...Z which
    are
    > > the first letter of the
    > > customer names...
    > > When the users clicks on the letter 'K' I want to display all the
    > customers
    > > where the first letter is 'K'
    > >
    > > The store proc always returns all the customers...
    > >
    > > does anyone has a sample code where I can get started.
    > > I appreciate any help.
    > >
    > > - Kilic
    > >
    > >
    >
    >

    Kilic Beg Guest

  7. #6

    Default Custom Paging

    Hi every1, I'm having problem with custom paging.
    I've used the sample from dotnetjunkies Thanks to Doug for putting
    together such a wonderful example.

    I've made some changes to fit the needs.

    Problem on Hand:
    When user clicks on the Navigation links (First, Next, Prev, or Last)
    after page load it still loads the same first page.
    However after the page load it changes the number of page.
    For example, Page # of Total_Pages will change to
    Page 2 of Total_Pages.

    This shows that Item collections works (implemented using stored
    procedure ...).

    Here's my guess, for some reason I'm thinking the following line of
    code is not working.

    Case "Next"
    _currentPageNumber = Int32.Parse(CurrentPage.Text) + 1

    or maybe I'm missing something ...

    Any suggestions or help would be highly apprecitated.
    If you like to see any part of the code let me know and I can post it.

    Thanks in advance.

    aspnetpal Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139