Base solution for your next web application
Open Closed

Best Practice for storing "per widget" settings for the user #11162


User avatar
0
marble68 created

Version 11.2.0 Core MVC

The scenario:

The user would add a widget that would display a table of data, and the table could be filtered by groups. The widget would show a table and the user could change a drop down at the top of the widget to choose which group is displayed. The filter would be specific to that instance of the widget.

The user could add multiple widgets, each with a different group as a filter.

The Goal

Users can customize a widgets' settings on a per widget basis for views on their dashboard(s).

What's the best approach?

I thought about extending the widget object with a key value pair, so it'd store on in settings under Dashboard / Page / Widgets.

Is this the best way? Or should I create an entirely different entity that holds the serialized widget settings and use that?

Is there a 'best practice' for doing this?

Thanks for any advice, Chris


1 Answer(s)
  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @marble68

    I tihnk you can store widget based custom settings in AbpSettings seperated from default widget settings. Since you write the code for your widgets, you can get the widget related settings and use them in your widgets.