Hiding add/reordering buttons in the grid widget

Archived from the Xataface Users forum.

alexchet — Fri Sep 16, 2011 4:35 am

Hi,
I use grid widget to edit related records. I want hide Add (+) and Reorder buttons and show only Delete one. Is there any way to do that?


shannah — Fri Sep 16, 2011 9:45 am

You can either use CSS or permissions. If the user is not granted the reorder_related_records permission for that relationship then they should disappear. Alternatively you can just look at the HTML and figure out the css to hide the buttons.

-Steve


alexchet — Sat Sep 17, 2011 7:24 pm

Thanks for the answer!
Unfortunately class HTML_QuickForm_grid does not check reorder_related_records permission
So I have to replace

Code: Select all
var $reorder=true;

with

Code: Select all
var $reorder=false;

at line 22 grid.php and got what I need.