concurrencymanager refresh slow on first record

  • Thread starter Christopher C. Bernholt
  • Start date
C

Christopher C. Bernholt

I have the following situation. I have a datagrid bound to an
arraylist. Initially, the arraylist is empty. When the user adds an
item, the item is added to the arraylist and then the datagrid is
updated by getting the currencymanager and calling its refresh method.
For reasons I won't go into here, at this point in time the datagrid is
simply for display purposes.

The problem is, there is a second or two delay from when the refresh
method is called and it returns but only on the first record. After
the first record is put into the arraylist, any subsequent additions to
the arraylist and calls to the currencymanager refresh method are
almost instantaneous.

Anyone run into this issue and/or know how to work around it?

Thanks!

--
--------------------------------------------------
Christopher C. Bernholt
I.T. Research & Development
..NET Re-Engineering Team
R & L Carriers, Inc.
http://www.gorlc.com
--------------------------------------------------
 
G

Guest

You might try adding a dummy item to the arraylist before you bind it to the
DataGrid then delete the dummy item after binding to the arraylist. You
could hide the datagrid using visible = False until this is completed. That
should be more pleasing to the user.

I suspect that when you first bind the arraylist with no items the DataGrid
doesn't have a clue what type items, etc that the arraylist will have so it
takes a second or so to sort this out when you add the first element. Just
guessing about the reason!
 
C

Christopher C. Bernholt

Thanks Dennis,

We ended up not binding at all until just after the first record was
put into the arraylist. The initial bind doesn't show the delay that
the currencyManager.Refresh did so this is working for us.


Dennis wrote :
You might try adding a dummy item to the arraylist before you bind it to
the DataGrid then delete the dummy item after binding to the arraylist.
You could hide the datagrid using visible = False until this is completed.
That should be more pleasing to the user.

I suspect that when you first bind the arraylist with no items the DataGrid
doesn't have a clue what type items, etc that the arraylist will have so it
takes a second or so to sort this out when you add the first element. Just
guessing about the reason!

--
--------------------------------------------------
Christopher C. Bernholt
I.T. Research & Development
..NET Re-Engineering Team
R & L Carriers, Inc.
http://www.gorlc.com
--------------------------------------------------
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top