databinding after page_load

Discussion in 'ASP .Net Datagrid Control' started by T-Bone, Apr 21, 2004.

  1. T-Bone

    T-Bone Guest

    Hi,
    I'm working on a webpage which starts with a rather timeconsuming
    database transaction. (two different .mdb's from different MSAccess
    versions :-().
    IN order to make things acceptable I want to use a progressbar. I use
    a webcontrol for that from Farside Web Progressbar.

    It works as follows:

    Instead of doing the database transaction in the page_load I make my
    own Sub named PerformTask which generates a DataSet. I want to bind
    that DataSet to a datagrid on my webpage.
    I call PerformTask from the aspx page with <% call PerformTask %> so
    it runs after Page_Load. Otherwise the progressbar is not showing.

    However when calling databind from the PerformTask routine which runs
    after the page_load event the datagrid is not showing up. Is there a
    way to bind the data after page_load an display the datagrid.
     
    T-Bone, Apr 21, 2004
    #1
    1. Advertising

  2. You may search this newsgroup for a way to create a splash screen effect.
    Using your approach the progress bar will not show up untill all processing
    is done.

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/27cok
    "T-Bone" <> wrote in message
    news:...
    > Hi,
    > I'm working on a webpage which starts with a rather timeconsuming
    > database transaction. (two different .mdb's from different MSAccess
    > versions :-().
    > IN order to make things acceptable I want to use a progressbar. I use
    > a webcontrol for that from Farside Web Progressbar.
    >
    > It works as follows:
    >
    > Instead of doing the database transaction in the page_load I make my
    > own Sub named PerformTask which generates a DataSet. I want to bind
    > that DataSet to a datagrid on my webpage.
    > I call PerformTask from the aspx page with <% call PerformTask %> so
    > it runs after Page_Load. Otherwise the progressbar is not showing.
    >
    > However when calling databind from the PerformTask routine which runs
    > after the page_load event the datagrid is not showing up. Is there a
    > way to bind the data after page_load an display the datagrid.
     
    Alvin Bruney [MVP], Apr 21, 2004
    #2
    1. Advertising

  3. T-Bone

    P K Guest

    O yes, the progressbar will show up because the PerformTask routine is
    executed after page_load.
    The page_load makes the progressbar show up. It's a seperate control.
    After the page_load the PerformTask routine is executed which does the
    timeconsuming transaction and makes the progressbar advance. That works
    fine.
    The only problem is that the datagrid will not show up when databind is
    executed from the PerformTask Sub.

    *** Sent via Developersdex http://www.developersdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    P K, Apr 21, 2004
    #3
  4. well, you need to provide the whole picture next time you post and not just
    parts of it. The datagrid only shows up if there is data. You can test your
    dataset to make sure it has data before you bind. Consider
    if(ds != null && ds.Tables[0].Rows.Count > )
    then bind here

    --
    Regards,
    Alvin Bruney [ASP.NET MVP]
    Got tidbits? Get it here...
    http://tinyurl.com/27cok
    "P K" <> wrote in message
    news:efaDhL%...
    >O yes, the progressbar will show up because the PerformTask routine is
    > executed after page_load.
    > The page_load makes the progressbar show up. It's a seperate control.
    > After the page_load the PerformTask routine is executed which does the
    > timeconsuming transaction and makes the progressbar advance. That works
    > fine.
    > The only problem is that the datagrid will not show up when databind is
    > executed from the PerformTask Sub.
    >
    > *** Sent via Developersdex http://www.developersdex.com ***
    > Don't just participate in USENET...get rewarded for it!
    >
     
    Alvin Bruney [MVP], Apr 22, 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. bminder
    Replies:
    1
    Views:
    2,179
    nfedin
    Feb 23, 2004
  2. z. f.
    Replies:
    0
    Views:
    563
    z. f.
    Oct 19, 2004
  3. rockdale
    Replies:
    1
    Views:
    661
    =?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
    Nov 16, 2006
  4. jobs
    Replies:
    0
    Views:
    1,632
  5. Earl Teigrob
    Replies:
    1
    Views:
    408
    Shravan
    Mar 1, 2004
Loading...

Share This Page