Retain Checkbox values in Yii gridview pagination

后端 未结 3 1470
故里飘歌
故里飘歌 2020-12-30 08:19

I have a gridview which contains a checkbox column and also uses pagination. When I check some checkboxes in the first page and navigate to the second page and check another

3条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-30 08:53

    For developing that scheme you would need to know working of what happens when you navigate.

    When ever you navigate to a pagination page ajax calls are made and new data is received and it is fetched from CActive Record or what ever the data source. New data is in accordance of database records or source records. when you come back to previous page again Ajax call is made and content is updated so same comes as it is in database.

    what i feel is you should save data of checked items temporary and make it permanent if action is made.

    You can do something like this

    
    

    you can save temporary storage somewhere

提交回复
热议问题