Input Data of Document Tabular section in separate Windows

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

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.

 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

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.

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Feb 13, 2012
Company: C.K. Elektronic Vertriebs GmbH

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.

 
#4
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

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

 
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.