B
Brian Tkatch
I have a form with two DataGrids, which are kept in sync manually via
Stored PROCEDURE calls. That is, when a record is selected on the first
grid, a stored PROCEDURE is CALLed to Fill() the next second DataGrid's
DataSource. All that works very well. And, when there are no records to
display, it is simply left blank.
My issue is that when i scroll the first one, sometimes the second grid
shows a bunch of null values (a "new" record).
After a little study, i realized the problem happens when there are no
records to show in the second grid, and the first grid is scrolled so
that the currently selected row (as indictated by Black Right-Pointing
Pointer (as Charmap calls it)) goes off the screen. This causes the
second grid to be automatically selected (as the now showing Black
Right-Pointing Pointer indicates) but because there are no records, it
starts a new one.
This is the same issue as having a blank DataGrid as the first control
in a Form's TabIndex. It will start a new record immediately.
The question is, how do i prevent this from happening? Starting a new
record needs to be possible manually, it should just not be started
automatically. And i would like the keep eacdh grid as a TabStop, and
lkeep the current order of TabIndexing.
B.
Stored PROCEDURE calls. That is, when a record is selected on the first
grid, a stored PROCEDURE is CALLed to Fill() the next second DataGrid's
DataSource. All that works very well. And, when there are no records to
display, it is simply left blank.
My issue is that when i scroll the first one, sometimes the second grid
shows a bunch of null values (a "new" record).
After a little study, i realized the problem happens when there are no
records to show in the second grid, and the first grid is scrolled so
that the currently selected row (as indictated by Black Right-Pointing
Pointer (as Charmap calls it)) goes off the screen. This causes the
second grid to be automatically selected (as the now showing Black
Right-Pointing Pointer indicates) but because there are no records, it
starts a new one.
This is the same issue as having a blank DataGrid as the first control
in a Form's TabIndex. It will start a new record immediately.
The question is, how do i prevent this from happening? Starting a new
record needs to be possible manually, it should just not be started
automatically. And i would like the keep eacdh grid as a TabStop, and
lkeep the current order of TabIndexing.
B.