The 1C:Enterprise developers forum

#1
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

I need on double click move the line to another Value table. The code below works 90%, sometimes everything work fine, sometimes it fails deleting the last line. Debugging shows that the last line have the correct value (for example 1 for 1 line table). Why this could be possible? Should I delete line in another place?

Code
&AtClient
Procedure VTChecksSelection(Item, SelectedRow, Field, StandardProcessing)
   Row = VTOptions.Add();
   Line = Items.VTChecks.CurrentData;
   Row.Bank = Line.Bank;
   Row.Number = Line.Number;
   Row.Account = Line.Account;
   Row.Value = Line.Value;
   
   VTChecks.Delete(SelectedRow);
   StandardProcessing = False;
EndProcedure

 
#2
People who like this: 0 Yes / 0 No
Timofey Bugaevsky
Guest

Joined:
Company:

Try this:

Code
VTChecks.Delete(VTChecks.IndexOf(Line));

 
#3
People who like this: 0 Yes / 0 No
Interested
Rating: 32
Joined: Oct 27, 2011
Company: Abaco Soluciones S.A.

That worked. Thanks

 
Subscribe
Users browsing this topic (guests: 2, registered: 0, hidden: 0)