Desktop version

Main > Forum > 1C:Enterprise Platform > 1C:Enterprise – Business applications platform > Input Data of Document Tabular section in separate Windows

Forum

Search UsersRules
Input Data of Document Tabular section in separate Windows
#1
Just came
Points:: 0
Joined:: Feb 13, 2012

I have a Document with tabular section called "positionen".

In the document-Form i placed the tabular section with action panel. In the OnStartEdit i placed following code:

Code
Procedure PositionenOnStartEdit(Item, NewRow, Clone)
   P = New Structure;
   If Not NewRow Then
      P.Insert("Data", SaveData(Items.Positionen.CurrentRow)); 
   EndIf;
   
   Result = OpenFormModal("Document.Auftraege.Form.FormPosition", P, ThisForm);
   
   If ValueIsFilled(Result) And TypeOf(Result) = Type("String") Then
      FoundData = GetFromTempStorage(Result);
      FillPropertyValues(Item.CurrentData,FoundData);
      Modified = True;
   EndIf;
EndProcedure

Now my problem:
After return from the ModalForm i want to end the edit at active row. Now i almost must press the escape-key to end the edit.

Profile
#2
Active user
Points:: 0
Joined:: Apr 18, 2012

May be this help you

FormTable.EndEditRow
FormTable
EndEditRow
Syntax:

EndEditRow(<CancelEdit>)
Parameters:

<CancelEdit> (required)

Type: Boolean.
If this parameter is set to True, row editing is cancelled.
Description:

Allows to finish or cancel editing the current row.

Profile
#3
Just came
Points:: 0
Joined:: Feb 13, 2012

Thank you alexht for answering.

unfortunately, but it does not work. I test the EndEditRow on the form on event "OnStartEdit".

I Think, in this event the EditMode is not set so it does not work.

Profile
#4
Active user
Points:: 0
Joined:: Apr 18, 2012

I can't find nothing better than this

Code
&AtClient
Procedure TabularSection1OnStartEdit(Item, NewRow, Clone)
   OpenFormModal("CommonForm.Form");
   AttachIdleHandler("EndEditRow", 0.1, True);
EndProcedure

&AtClient
Procedure EndEditRow()
   Items.TabularSection1.EndEditRow(False);
EndProcedure

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.