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

Set default view all or page. #347

Closed
robertolucas opened this issue Jul 31, 2015 · 1 comment
Closed

Set default view all or page. #347

robertolucas opened this issue Jul 31, 2015 · 1 comment

Comments

@robertolucas
Copy link

Scenario: I need to set page or all in the grid by default.

I've made a little change in the source code GridView.php

I've defined a public var, by default 'page'.

public $defaultPagination = 'page';

You can set it to 'all'

In the init function i've changed

$this->_isShowAll = ArrayHelper::getValue($_GET, $this->_toggleDataKey, 'page') === 'all';

for

$this->_isShowAll = ArrayHelper::getValue($_GET, $this->_toggleDataKey, $this->defaultPagination) === 'all';

Could you include this option in a future version?

@kartik-v
Copy link
Owner

Resolved via update to release v3.0.8 (still not tagged and in dev-master).

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

No branches or pull requests

2 participants