Hiccup in master-detail display

G

Guest

Hello,

I have a strange performance delay of about 2 sec's in moving to the next
row. I use multiple forms with each master-detail table relations. The
master-table displays it's table rows in databound textboxes, the detail
tables in datagrids, and of course relations defined between the master and
detail tables. All the tables are part of one dataset (per form). The
following happens.

When moving to the next tablerow (next record) I get an performance delay of
about 2 sec's: only if one of the (child)datagrids is empty (no records to
show) and this happens only one time per application-startup. If I end this
form and startup the same or another form the problem doesn't exist any more,
until the program is stopped and started again. So it happens only one time
per appliation-use, and is definitely bound to the "empty detail grid".
Filling the empty grid with one record, the problem moves to another master
row having an "empty detail grid". At the moment of this delay the
application is not getting data from Sql-sever (checked via a trace), and I
found that running my projects on an VS.NET-2002 with framework 1.0 machine
does NOT show this problem. What can cause this problem?

My machine: XP-Pro + VS.NET 2003 Framework: 1.1.4322 SP1
 
C

Chris Dunaway

I'm not sure what is causing your problem, but the behavior is similar
to that of an exception being thrown. The first time an exception is
thrown it takes a second or two and then thereafter, that delay is
gone, unless you restart the app.

Could there be an exception being thrown down in your code somewhere
that is just being swallowed and not logged or reported? Perhaps when
the detail grid is empty an exception is being thrown that is
subsequently swallowed up.

Just a thought.
 
G

Guest

Thanks for your suggestion. It helped me a step forward. I did the following:
in the Debug menu -> Exception... I put the option "when the exception is
thrown" to "Break into the debugger", for all kind of exceptions. Running my
project shows at the critical point an exception:

A first chance exception of type "System.IndexOutOfRangeException" occurred
in system.windows.forms.dll. Additional information: Index was outside the
bounds of the array.

At this critical point the code is executing the following line:
Me.BindingContext(mDv1).Position += 1
hereby mDv1 declared as DataView

Have you any idea how to go further to get this solved?
 

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