Turn Edit property to false depending on the value of other cell

QuestionsTurn Edit property to false depending on the value of other cell
[email protected] asked 4 years ago

Hey Abu,

I’m trying to do the following:

When you update the value of a field; If this has the value ‘X’ it will block the next two cells from being updated.

If you update the value to ‘Y’ it will allow you to edit the other two cells.

(On default, the field will have the ‘Y’ value)


What I have at the moment is not working properly because I need to refresh the page after the update for the conditions (block/unblock) to go through.


I have sent you a mail with the code.

Let me know if you need more info or anything else.


Many thanks, Alberto.





3 Answers
Abu Ghufran Staff answered 4 years ago


Working Demo: https://gist.github.com/gridphp/e8ec2413d2880a906a976aa94747836b

Line 45,87

This idea is taken from this faq: http://www.phpgrid.org/faqs/#80

Abu Ghufran - Dev Team
Grid 4 PHP Framework
pierre mata answered 4 years ago

Hello Abu, the code in demo works fine, but with date controls the data cell turns disabled, but the button that show the calendar object keep enabled and this can modify the date data…..

thanks a lot

Abu answered 4 years ago

Instead of disabling, you can completely hide() that row and show() otherwise.


Code: https://gist.github.com/gridphp/e1ee390bd3bbabb372958f9fea7a30b8

Line 31,32,191-211

See: https://i.imgur.com/X9GJedd.gif

Your Answer

8 + 18 =

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?