Closed ric128 closed 2 months ago
Hi!
Can you show me your code?
Atenciosamente, João Marques
Em 22 de fev de 2018 10:34 -0300, ric128 notifications@github.com escreveu:
Hi Marqu3s I tried to change the "sessionVarName""GridFilters" to "myOwnNameGridFilters" but it doesn't work. Why? or how can I change the sessionVarName? Thank you. — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.
This works
class BncCuentasSearch extends BncCuentas {
public function behaviors()
{
return [
'saveGridFilters' =>[
'class' => SaveGridFiltersBehavior::className(),
'sessionVarName' => self::className() . 'GridFilters'
],
'saveGridPage' =>[
'class' => SaveGridPaginationBehavior::className(),
'sessionVarName' => self::className() . 'GridPage'
]
];
}
public function search($params)
{
$this->load($params);
$dataProvider= new SqlDataProvider([...........
$dataProvider = $this->loadWithFilters($params, $dataProvider);
$dataProvider->pagination->page = $this->getGridPage();
return $dataProvider;
}
This doesn't work.
class BncCuentasSearch extends BncCuentas {
public function behaviors()
{
return [
'saveGridFilters' =>[
'class' => SaveGridFiltersBehavior::className(),
'sessionVarName' => self::className() . 'MyOwnNameGridFilters'
],
'saveGridPage' =>[
'class' => SaveGridPaginationBehavior::className(),
'sessionVarName' => self::className() . 'GridPage'
]
];
}
public function search($params)
{
$this->load($params);
$dataProvider= new SqlDataProvider([...........
$dataProvider = $this->loadWithFilters($params, $dataProvider);
$dataProvider->pagination->page = $this->getGridPage();
return $dataProvider;
}
No interaction in a long time.
Hi Marqu3s I tried to change the "sessionVarName""GridFilters" to "myOwnNameGridFilters" but it doesn't work. Why? or how can I change the sessionVarName? Thank you.