Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable edit on runtime #1101

Open
chandrakant2511 opened this issue Jan 21, 2014 · 3 comments
Open

disable edit on runtime #1101

chandrakant2511 opened this issue Jan 21, 2014 · 3 comments

Comments

@chandrakant2511
Copy link

Hello,

In my db table structure, I have one field say is_active. If I received is_active = 0 while list from table at that time i would like to disable edit option for that particular record for which is_active = 0.

Thanks in advance.

@chandrakant2511
Copy link
Author

                            actions: {
                                    listAction: {
                                            url: 'actionproject.php?action=list',
                                            enabled: function(data) {
                                                    if(data.record.is_overrun == 0) {
                                                            updateAction: 'actionproject.php?action=update';
                                                    }
                                            }
                                    },
                                    createAction: 'actionproject.php?action=create',
                                    deleteAction: 'actionproject.php?action=delete'                                                 
                            },

I have used above code and get reference from #113. But still edit icon showing me on ui.

please help

@galastur
Copy link

galastur commented Feb 3, 2014

I believe that was just an explanation of how that new functionality could be implemented but it never got added.

Please read #893 , the suggestion is to hook yourself to the row loaded event and hide the button at that point

data.row.find('.jtable-edit-command-button').hide();

Hope it helps

@chandrakant2511
Copy link
Author

solved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants