How to Intercept the Tabular Section Row Addition?

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

Good morning, everyone!
I need to ins ert a specific value in one cell of the row when the new row is added.

If Object.ItemType = PredefinedValue("Enum.ItemTypes.Cartridge") Then
 Items.ItemType.CurrentData.Quantity = 1;
EndIf;

If I insert this code in BeforeAddRow an error occured. If in OnChange the val ue is inserted, but when a row is deleted it produces an error again. Which event should I use for this task? And also I would like to know how to copy rows in the tabular section (when a user clicks Copy button).
Thanks in advance

 
#2
People who like this:0Yes/0No
Just came
Rating: 0
Joined: Mar 12, 2012
Company:

You must use "OnStartEdit" event.

 
#3
People who like this:0Yes/0No
Active user
Rating: 6
Joined: Sep 16, 2011
Company:

Thanks! That worked.

 
Subscribe
Users browsing this topic (guests: 1, registered: 0, hidden: 0)
Be the first to know tips & tricks on business application development!

A confirmation e-mail has been sent to the e-mail address you provided .

Click the link in the e-mail to confirm and activate the subscription.