Async dataset populating.....

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Steve

    Async dataset populating.....


    Windows C#

    I have some search screens in my app which can, with certain search params,
    bring back thousands of rows, and can take ages to populate. So I am trying
    to find a better way of them operating. One idea is to batch the results up.
    So I could go and get the 1st 50 rows and populate the datagrid with those,
    then when they scroll to the last of these 50 it goes and gets the next 50.

    That got me thinking asynchronous. Would it be possible to fire off a
    process that went to get all 10000 rows for example, but return them every 50
    or so when it had them. So the process would fire off, and return the first
    50, the user is free to peruse those while the process is busy in the
    background getting the rest of the records, spitting them into the datagrid
    every 50.

    Is any of this possible? How?

    Cheers

    Steve
  • Cor Ligthert [MVP]

    #2
    Re: Async dataset populating.....

    Steve,

    The method you ask for is in my idea "Paging". It is not assynchronous. For
    ASPNet it is a part of the datagrid methods. For windowsforms we have some
    samples on our website, but the name of that website is VB-Tips, so I assume
    that you understand that there are no C# samples.

    Cor

    "Steve" <Steve@discussi ons.microsoft.c om> schreef in bericht
    news:922B7B60-5DB5-4D42-AE2E-E4AA673B358C@mi crosoft.com...[color=blue]
    >
    > Windows C#
    >
    > I have some search screens in my app which can, with certain search
    > params,
    > bring back thousands of rows, and can take ages to populate. So I am
    > trying
    > to find a better way of them operating. One idea is to batch the results
    > up.
    > So I could go and get the 1st 50 rows and populate the datagrid with
    > those,
    > then when they scroll to the last of these 50 it goes and gets the next
    > 50.
    >
    > That got me thinking asynchronous. Would it be possible to fire off a
    > process that went to get all 10000 rows for example, but return them every
    > 50
    > or so when it had them. So the process would fire off, and return the
    > first
    > 50, the user is free to peruse those while the process is busy in the
    > background getting the rest of the records, spitting them into the
    > datagrid
    > every 50.
    >
    > Is any of this possible? How?
    >
    > Cheers
    >
    > Steve[/color]


    Comment

    Working...