ShowQueryBox

The 1C:Enterprise developers forum

#1
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Nov 5, 2011
Company: DND Yazılım

Hi,

The user is notified before the deletion
How can use ShowQueryBox

Code
&AtClient
Procedure ListBeforeDeleteRow(Item, Cancel)
   Answer = DoQueryBox("....?", Mode, 0);
   If Answer = DialogReturnCode.No Then
      Cancel= True;
   EndIf;      
EndProcedure

Edited: Emre KARA - Sep 29, 2016 02:09 PM
 
#2
People who like this:0Yes/0No
Active user
Rating: 4
Joined: Apr 18, 2012
Company:

Hi.

It's little complicated in an asynchronous mode.

Here is an example:

Code
&AtClient
Procedure ListBeforeDeleteRow(Item, Cancel)
   Cancel = True;
   ShowQueryBox(New NotifyDescription("ListBeforeDeleteRowEnd", ThisObject), NStr("en = 'Delete row?'"), QuestionDialogMode.YesNo);
EndProcedure

&AtClient
Procedure ListBeforeDeleteRowEnd(QuestionResult, AdditionalParameters) Export
   If QuestionResult = DialogReturnCode.Yes Then
      Row = Object.List.FindByID(Items.List.CurrentRow);
      Object.List.Delete(Row)
   EndIf;
EndProcedure

 
#3
People who like this:0Yes/0No
Just came
Rating: 1
Joined: Nov 5, 2011
Company: DND Yazılım

Thank you so much

 
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.