Skip to main content
Answer

Disable default actions in grid based on a condition

  • December 4, 2023
  • 2 replies
  • 230 views

param2022
Jr Varsity II
Forum|alt.badge.img

I want to disable all of these actions for my custom grid on a particular status of my parent document. How it can be done please advice

 

Thanks

Best answer by Naveen Boga

@param2022  Write a condition with the below code in the Row_Selected Event

 

GRIDView.AllowInsert = false; // To disable the Insert button

GRIDView.AllowUpdate = false; // To disable the rows to update the records

GRIDView.AllowDelete = false; // To disable the delete button 

2 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Captain II
  • December 4, 2023

In your master DAC RowSelected event handler set the child View AllowInsert AllowUpdate And AllowDelete to false when condition met. For example if your grid view name is ChildView theN set the above mentioned properties like

ChildView.AllowInsert = false; if your code is in a graph ext then add Base. before your view name.


Naveen Boga
Captain II
Forum|alt.badge.img+19
  • Captain II
  • Answer
  • December 4, 2023

@param2022  Write a condition with the below code in the Row_Selected Event

 

GRIDView.AllowInsert = false; // To disable the Insert button

GRIDView.AllowUpdate = false; // To disable the rows to update the records

GRIDView.AllowDelete = false; // To disable the delete button