Skip to main content
Answer

How can I conditionally Enable/Disable a grid standard action buttons

  • July 2, 2023
  • 3 replies
  • 435 views

aaghaei
Captain II
Forum|alt.badge.img+10

I needed to conditionally disable the Standard Delete Action Button of a grid. Lat say the view associated with the grid is MyView. I can get some of the grid action buttons’ names like the Upload button using something like “MyView$ImportAction”. I need the same for the grid Delete Action Button. So I am trying “MyView$DeleteAction” and “MyView$Delete but seems nothing exists that I can Enable/Disable in the RowSelected event. If that was for the whole grid I could just simply set its Cache.AllowDelete = false but I need only disable on specific lines. Any idea how can I make this work?

Best answer by Yuriy Zaletskyy

Two years ago, the only working way, was using of Javascript. At level of C# and RowSelected proved to be without success. 

3 replies

aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • July 2, 2023

@Yuriy Zaletskyy If you get a minute can you please help me out here? Thank you


Yuriy Zaletskyy
Jr Varsity I
Forum|alt.badge.img+3

Two years ago, the only working way, was using of Javascript. At level of C# and RowSelected proved to be without success. 


aaghaei
Captain II
Forum|alt.badge.img+10
  • Author
  • Captain II
  • July 3, 2023

@Yuriy Zaletskyy Thank you for the insight.