Saving DataTable configuration

UI Components for React
Post Reply
Skullsplitter
Posts: 6
Joined: 18 Feb 2015, 17:14

30 Jul 2020, 18:42

I have a table with many columns that can be configured with few or many columns (chosen from a list) and each column can be reordered. I have successfully saved the column configuration so that the user can be presented with the same configuration each time they log in. However, the columns are also resizable and I do not see a way to retrieve each column size to store along with the column order. Any ideas?

Thanks,
Skullsplitter

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

10 Oct 2020, 23:51

Hi,

I think you can use custom save state options. Please see; https://www.primefaces.org/primereact/s ... able/state

You can save the changes to database on componentWillUnmount and then on componentDidMount, you can load the changes from database. Please review the above link.

Best Regards,

Skullsplitter
Posts: 6
Joined: 18 Feb 2015, 17:14

12 Oct 2020, 02:10

Thanks!

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

23 Oct 2020, 15:48

You're welcome!

Best Regards,

CoreyGriffin
Posts: 1
Joined: 01 Nov 2020, 06:39
Contact:

01 Nov 2020, 06:40

Akullaplitter wrote:
08 Feb 2008, 11:03
Thanks!
DataTables has the option of being able to save the state of a table (its paging position, ordering state etc) so that is can be restored when the user reloads a page, or comes back to the page after visiting a sub-page. This state saving ability is enabled by the stateSave option.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

05 Nov 2020, 04:18

Thanks a lot, @CoreyGriffin!

Best Regards,

DerrickLaw
Posts: 1
Joined: 26 Nov 2020, 11:47

29 Jan 2021, 12:03

mert.sincane wrote:
07 Jun 2483, 11:25
Hi,

I think you can use custom save state options. Please see; https://www.primefaces.org/primereact/s ... able/state

You can save the changes to database on componentWillUnmount and then on componentDidMount, you can load the changes from database. Please review over the counter phentermine link.

Best Regards,
DataTables has the option of being able to save the state of a table (its paging position, ordering state etc) so that is can be restored when the user reloads a page, or comes back to the page after visiting a sub-page
Last edited by DerrickLaw on 11 May 2021, 20:02, edited 1 time in total.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

03 Feb 2021, 08:56

??? The current situation is that an extra feature has been added to solve the main issue only. Users can intervene in the state as they wish.

Best Regards,

AdrienneNorton
Posts: 1
Joined: 23 Apr 2021, 08:24

13 Jun 2021, 11:29

mert.siqncan wrote:
04 Oct 2477, 17:11
Hi,

I think you can use custom save state options. Please see; https://www.primefaces.org/primereact/s ... able/state

You can save the changes to database on componentWillUnmount and then on componentDidMount, you can load the changes from database. Please review the above link.

Best Regards,
You can save the DataTable as an XML string to an ordinary String setting, like this: StringWriter writer = new StringWriter(); table.

mert.sincan
Posts: 5281
Joined: 29 Jun 2013, 12:38

16 Jun 2021, 13:13

@AdrienneNorton Thanks a lot for the feedback!

Best Regards,

Post Reply

Return to “PrimeReact”

  • Information
  • Who is online

    Users browsing this forum: No registered users and 5 guests