Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

True DB Grid 6: Have 3 lines selected but selbookmarks loop found 4!!

Status
Not open for further replies.

emartinho

Programmer
Aug 8, 2001
10
CA
Hello all,

I have a set of data that are created with a loop of the SelBookmarks in a TDBGrid. There are 5 lines in the original grid of which 3 were selected, however 4 lines were inserted (the last selected line was duplicated).

The code is something like this:

While TBG_REDE_CONV.SelBookmarks.Count > 0

S_LINHA = TBG_REDE_CONV.SelBookmarks.Count - 1
'Load a suplemental XArrayDB
For S_COLUNA = 0 To M_COL
P_XARRAY(P_XARRAY.UpperBound(1), S_COLUNA) = TBG_REDE_CONV.Columns(S_COLUNA).CellText(TBG_REDE_CONV.SelBookmarks.Item(S_LINHA))
Next
<code to create new line>
wend

The only way that I can see for this to happen is a double selection of the last line selected, but I haven't been able to duplicate the problem.

Does anyone have any ideas?

Thanks in advance.
-Elio
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top