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

Window Resize Issue #58

Open
npiscopo opened this issue Apr 19, 2018 · 5 comments
Open

Window Resize Issue #58

npiscopo opened this issue Apr 19, 2018 · 5 comments

Comments

@npiscopo
Copy link

Hi,

I've noticed that the gridview does not resize to fit the window when it is resized. For instance, if you set the width to 100% and open in a sized window. Then maximize the window, and the gridview stays it's original size unless you refresh the window.

Any thoughts/fixes would be greatly appreciated.

@twlikol
Copy link
Owner

twlikol commented May 3, 2018

I think it's better handle resize event by your self.

@npiscopo
Copy link
Author

npiscopo commented May 3, 2018

Really? This makes it look sloppy. If I had a way to do this myself, I would not have posted here. As a workaround, I have a hidden button that rebinds the grid via javascript when resized. This doesn't seem like the best solution. What else do you recommend?

@twlikol
Copy link
Owner

twlikol commented May 3, 2018

I usually use jquery to handle resize event, Like the following code:

var gridViewScroll = new GridViewScroll({
    elementID : "gvMain"
});
function resize(){
  gridViewScroll.enhance();
}
$(document).ready(function() {
  resize()
  $(window).resize(function(){
    resize();
  });
});

@IMarvinTPA
Copy link

If I understand the final response correctly, do we need to destroy and recreate the gridviewscroll each time we resize or is there some method that lets it just adjust its size?

@twlikol
Copy link
Owner

twlikol commented May 11, 2018

re-call the enhance method, it will check.

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

3 participants