Row level actions

QuestionsRow level actions
Alessio Bruscagli asked 2 years ago

HI.
In the grid I would need to condition the edit and delete actions at a single row level: how can I do this?
Thank you.

2 Answers
Abu Ghufran Staff answered 2 years ago

To know how to make certain row non-editable, You need to check column-access demo: https://www.gridphp.com/demo/demos/editing/column-access.phps
 
E.g. If you wish to show all rows but make them readonly on certain conditions e.g. gender = male, then you can refer to the following demo code.
It needs some additional javascript code to restrict editing of rows.

Line 36-41, set events to apply checks
Line 127-132, restrict double click editing, where gender=male
Line 150-154, restrict default display to readonly row, where gender=male
Line 176-180, restrict if select all checkbox is checked.
Line 198-202, restrict if single row is selected (line 222-225 if multi-select is enabled).

_________________________
Abu Ghufran - Dev Team
Grid 4 PHP Framework
 
Alessio Bruscagli answered 2 years ago

Many thanks for the reply!

Your Answer

11 + 1 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?