Hi.
The thing is that I have to use temp tables. There is now way around it.
Don't ask why, just accept it

Anyway, specifying the number of records to be fetched in the fill method of
the dataadapter doesn't change anything. I would still have to return to
the db on each page call.
Shawn
"Kaustav" <> wrote in message
news:FEC7FB69-ABE2-471F-BEE1-...
> Hi Shawn,
>
> creating temp tables is not an ideal solution. You would be better off
using
> derived tables as compared to temp tables. How about specifying the number
of
> records to be fetched in the Fill method of the DataAdapter when you
change
> the page of the datagrid.
>
> HTH.
>
> Kaustav Neogy.
>
> "Shawn" wrote:
>
> > Hi.
> >
> > I already have a datagrid where I'm using paging. I have a stored
procedure
> > that fills a temp table with 200-500 rows and then sends back 10 records
at
> > the time. When I go to page 2 the SP fills the temp table again and
returns
> > rows 10-19. The temp table is dropped after each call to the SP, so it
has
> > to be created and filled every time the user changes page in the
datagrid.
> > My question is this: Would it be more efficient to return all rows to
the
> > datagrid and set the visibility on each datagriditem instead? After the
> > datagrid is filled up I could hide all but the 10 first datagrid items,
and
> > when the user changes to page 2 I could set only datagrid items 10-19
> > visible etc. I have read quite a lot about custom paging, but I have
never
> > read anything about this approach therefore I'm interested in what you
> > experts have to say. Is it a good idea?
> >
> >
> >
> > Thanks,
> >
> > Shawn
> >
> >
> >