Re: limit the number of rows

Discussion in 'ASP .Net' started by Ken Cox [Microsoft MVP], Aug 16, 2004.

  1. You can set the PageSize property if you are using paging. Is that what you
    meant?

    If so, take the input from the user and use that to set the number of rows
    per page.

    http://msdn.microsoft.com/library/d...ebuiwebcontrolsdatagridclasspagesizetopic.asp

    "IGotYourDotNet" <> wrote in message
    news:...
    > on my web app, i need to have a input box to allow the user to set the
    > number
    > of rows they see in the grid,, Now i'm going against oracle so how can i
    > do
    > that?
    >
    > example:
    > when the page loads I pull all rows back, but if the user only wants to
    > see
    > 10 or 5 I can I make that change to the grid and only show 10 or 5?
    >
    Ken Cox [Microsoft MVP], Aug 16, 2004
    #1
    1. Advertising

  2. Ken Cox [Microsoft MVP]

    Mike Guest

    i'm not using paging exactly.
    what the web app does it has a text box to allow user to enter the top 10,
    20 etc rows from the database.
    It shows all when the page loads but they can customize it to show only a
    certain number of rows. But they can't page through the grid (recordset)
    Example:
    if the user selects 10 rows then the grid shows 10 rows only.


    "Ken Cox [Microsoft MVP]" <> wrote in message
    news:OawdQB%...
    > You can set the PageSize property if you are using paging. Is that what

    you
    > meant?
    >
    > If so, take the input from the user and use that to set the number of rows
    > per page.
    >
    >

    http://msdn.microsoft.com/library/d...ebuiwebcontrolsdatagridclasspagesizetopic.asp
    >
    > "IGotYourDotNet" <> wrote in

    message
    > news:...
    > > on my web app, i need to have a input box to allow the user to set the
    > > number
    > > of rows they see in the grid,, Now i'm going against oracle so how can i
    > > do
    > > that?
    > >
    > > example:
    > > when the page loads I pull all rows back, but if the user only wants to
    > > see
    > > 10 or 5 I can I make that change to the grid and only show 10 or 5?
    > >

    >
    Mike, Aug 17, 2004
    #2
    1. Advertising

  3. What you will have to do it to limit the number of rows on the database
    server. This can be done in stored proc using TOP or SET ROW COUNT clause.
    Other way is only bind specified number of rows. To do this u can use a
    DataView to filter out some of the rows and bind that to the grid.

    Shailesh

    "Mike" wrote:

    > i'm not using paging exactly.
    > what the web app does it has a text box to allow user to enter the top 10,
    > 20 etc rows from the database.
    > It shows all when the page loads but they can customize it to show only a
    > certain number of rows. But they can't page through the grid (recordset)
    > Example:
    > if the user selects 10 rows then the grid shows 10 rows only.
    >
    >
    > "Ken Cox [Microsoft MVP]" <> wrote in message
    > news:OawdQB%...
    > > You can set the PageSize property if you are using paging. Is that what

    > you
    > > meant?
    > >
    > > If so, take the input from the user and use that to set the number of rows
    > > per page.
    > >
    > >

    > http://msdn.microsoft.com/library/d...ebuiwebcontrolsdatagridclasspagesizetopic.asp
    > >
    > > "IGotYourDotNet" <> wrote in

    > message
    > > news:...
    > > > on my web app, i need to have a input box to allow the user to set the
    > > > number
    > > > of rows they see in the grid,, Now i'm going against oracle so how can i
    > > > do
    > > > that?
    > > >
    > > > example:
    > > > when the page loads I pull all rows back, but if the user only wants to
    > > > see
    > > > 10 or 5 I can I make that change to the grid and only show 10 or 5?
    > > >

    > >

    >
    >
    >
    =?Utf-8?B?U2hhaWxlc2ggSmFubnU=?=, Aug 17, 2004
    #3
  4. how could i use a dataview to do this?

    "Shailesh Jannu" wrote:

    > What you will have to do it to limit the number of rows on the database
    > server. This can be done in stored proc using TOP or SET ROW COUNT clause.
    > Other way is only bind specified number of rows. To do this u can use a
    > DataView to filter out some of the rows and bind that to the grid.
    >
    > Shailesh
    >
    > "Mike" wrote:
    >
    > > i'm not using paging exactly.
    > > what the web app does it has a text box to allow user to enter the top 10,
    > > 20 etc rows from the database.
    > > It shows all when the page loads but they can customize it to show only a
    > > certain number of rows. But they can't page through the grid (recordset)
    > > Example:
    > > if the user selects 10 rows then the grid shows 10 rows only.
    > >
    > >
    > > "Ken Cox [Microsoft MVP]" <> wrote in message
    > > news:OawdQB%...
    > > > You can set the PageSize property if you are using paging. Is that what

    > > you
    > > > meant?
    > > >
    > > > If so, take the input from the user and use that to set the number of rows
    > > > per page.
    > > >
    > > >

    > > http://msdn.microsoft.com/library/d...ebuiwebcontrolsdatagridclasspagesizetopic.asp
    > > >
    > > > "IGotYourDotNet" <> wrote in

    > > message
    > > > news:...
    > > > > on my web app, i need to have a input box to allow the user to set the
    > > > > number
    > > > > of rows they see in the grid,, Now i'm going against oracle so how can i
    > > > > do
    > > > > that?
    > > > >
    > > > > example:
    > > > > when the page loads I pull all rows back, but if the user only wants to
    > > > > see
    > > > > 10 or 5 I can I make that change to the grid and only show 10 or 5?
    > > > >
    > > >

    > >
    > >
    > >
    =?Utf-8?B?SUdvdFlvdXJEb3ROZXQ=?=, Aug 17, 2004
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. TomislaW
    Replies:
    3
    Views:
    1,743
    Eliyahu Goldin
    Dec 8, 2004
  2. Subba Rao via DotNetMonster.com

    script for moving rows up and down and traverse thru rows of HTML table

    Subba Rao via DotNetMonster.com, Mar 19, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    8,218
    Subba Rao via DotNetMonster.com
    Mar 19, 2005
  3. Replies:
    1
    Views:
    1,076
    Victor Bazarov
    Jun 28, 2005
  4. noisenet
    Replies:
    0
    Views:
    397
    noisenet
    May 29, 2007
  5. jobs
    Replies:
    1
    Views:
    1,828
    Masudur
    Jul 15, 2007
Loading...

Share This Page