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

Modify of cellwidth, totally disable showing of columns #28

Open
md-20 opened this issue Jul 31, 2017 · 2 comments
Open

Modify of cellwidth, totally disable showing of columns #28

md-20 opened this issue Jul 31, 2017 · 2 comments

Comments

@md-20
Copy link

md-20 commented Jul 31, 2017

Hello!
I like your plugin a lot! It is the only one I found that can edit database tables and show them nicely as well as hide some columns 🙂

  • I would like to change the width of each of the shown cells. How can I do that? Does it work with Slickgrid? Here width is implemented, but not from the database: SlickGrid Example.

  • Also the auto edit function seems to be great. How can I implement it to this plugin?

  • Most important: I would like to totally disable the view of some of the columns. The hidden columns still show, but shrinked.
    Thank you!

@bobbysmith007
Copy link
Member

@md-20
Copy link
Author

md-20 commented Jul 31, 2017

Wow, thank you for the quick answer! I managed to select my wanted columns, great!
The auto edit ist not that important.
But that resizing - im not familiar with writing scripts by myself. Do i just copy this in the functions.php after the table editor array?
Thank you so much :)
`<script>
if(typeof(NS) == 'undefined') NS={};
(function(){ "use strict";
var $ = jQuery;

NS._doUpdateWidths = function(){
// not sure why this was required, but I was getting infinite loops without its, so whatever
if(NS._widthUpdateDone) return;
NS._widthUpdateDone = true;
NS._widthTimeout = null;
var cs = DBTableEditor.grid.getColumns();
cs[0].width = 175;
DBTableEditor.grid.setColumns(cs);
};
</script>`

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