Cgridview And Maintaing States Of Selected Checkbox

Hi,

I have a page which displays a CgridView with pagination enabled and two buttons below the Cgridview.

When I navigate between pages in Cgridview, the two buttons displays on top of the CgridView [supposed to display below the Cgridview].

Also I need to maintain the state of checkbox column even on navigating between pages in Cgridview.

Please help me to solve the above issues?

Thanks in advance.

Regards,

Vidhya

Hi vidhya

To maintain the state of checkboxes, check out this post: link

The answer provided by bool.dev will keep state during pagination.

The answer titled “Also make this work on normal form submit” will keep state during - uh well - form submit. So maybe you want to create records based on the selected checkboxes. If there are validation errors, you can use this feature to display the gridview again - keeping the checkboxes’ state.

Thank you Gerhard .

Regards,

Vidhya