Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > How to Intercept the Tabular Section Row Addition?

Forum

Search UsersRules
How to Intercept the Tabular Section Row Addition?
#1
Active user
Points:: 2
Joined:: Sep 16, 2011

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

Profile
#2
Just came
Points:: 0
Joined:: Mar 12, 2012

You must use "OnStartEdit" event.

Profile
#3
Active user
Points:: 2
Joined:: Sep 16, 2011

Thanks! That worked.

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



© 1C LLC. All rights reserved
1C Company respects the privacy of our customers and visitors
to our Web-site.