Conditional edit/delete

QuestionsConditional edit/delete
David asked 11 years ago

Hi everybody,

i would like to know if there is a possibility to disable inline editing,edit,delete action on conditional value ?

ex: i have a table with invoice , when invoice is already send, field "sended" is put at true.

condition would be if "sended"== true no possibility for edit/delete. to prevent changing a record which can not be changed.

Thanks

7 Answers
Abu Ghufran answered 11 years ago

Please refer demos/editing/column-access.php
This demo disables editing when gender = male.
You can alter it accordingly.

David answered 11 years ago

Thanks Abu ,

I missed that part of the demo folder , that's exactly what I was looking.

Regards

Abu Ghufran answered 11 years ago

Emailed you the demo code.

Javier Lopez answered 10 years ago

Hello Abu.
I same the same question… my versiĆ³n of PHPgrid is the 1.4.8 (not free)

Can I use this function with this version?… can you send me the sample?

Thanks!

Abu Ghufran answered 10 years ago

Update emailed. Please contact [email protected] for package update,

Andrei answered 7 months ago

Can we conditionally set $col["editable"] to true or false based on the values of other columns?

Abu answered 6 months ago

You can set this column as readonly based on condition.

https://www.gridphp.com/demo/demos/editing/column-access.phps
Line 66: set callback function
Line 231-238: callback function that will make gender field readonly when have certain clientids.

Your Answer

2 + 20 =

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?