Okay
  Public Ticket #1652109
Custom Views (set of canned Columns and Filters)
Closed

Comments

  •  2
    Larry started the conversation

    I'm trying to have one master table (with many Columns and Rows) where users can press one of a handful of buttons to get different canned "views" of the data by applying a pre-defined set of Column and Filter settings.

    For example, if you have a table of people with lots of data such as name, home address, work address, home phone, work phone, body measurements, gender etc., then I'd like views such as:

    • Work View (Columns: Name, Work Address, Work Phone; Filters: None)
    • Male Body Measurements View (Columns: Name, Height, Weight; Filters: Gender = "Male")
    • etc.

    The task primarily seems to be some JavaScript to loop through the Columns and show or hide them as desired. Then loop through the Filters and clear or set them as desired.

    Is this feature already available either via plugin or documented somewhere how to implement it? If not, can you point me in the right direction to do this myself. Any example to get me started would be very helpful. 

    Thanks!

  •  471
    Isidora replied

    Hi LarryDaniele,
    Thank you for your purchase.

    Unfortunately, there is no built in solution for something like this. What you can do is to duplicate that master table for each view and then set on both tables columns that you want to show and filters and predefined values that you need. You have button Clear filters which which you can reset filters in table. Then you can insert all tree tables on page and make two buttons for both views. With javascript you can set to view tables be hidden on load and show only master table. When click on first view button to hide master table and show only table for first view. Same logic for second view button.

    If this is what you looking for then you can check out Datatables jQuery plugin on which is based wpdatatables on this link.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables

  •  2
    Larry replied

    Thanks Milan. 

    I looked at the DataTables Buttons documentation and it seems that the Column Groups property of the colvisGroup button is exactly what I'm looking for. The example on this page does just what I want to do (at least as far as Columns are concerned). So now I just have to see about getting this hooked into the wpDataTable on the page.

  •  471
    Isidora replied

    HI LarryDaniele,

    The front-end (JS) part of wpDataTables plays a significant role in the plugin’s functionality. Generally, front-end rendering is done by the DataTables jQuery plugin, but wpDataTables introduces some callbacks of its own.

    All wpDataTables existing on the page are reflected in the global JavaScript object called ‘wpDataTables‘. You can take a look in our documentation about Front-end callbacks.

    Kind Regards, 

    Isidora Markovic

    wpDataTables: FAQFacebookTwitterFront-end and back-end demoDocs

    Amelia: FAQFacebookTwitter |  Amelia demo sites | Docs

    You can try our wpDataTables add-ons before purchase on these sandbox sites:

    Powerful FiltersGravity Forms Integration for wpDataTablesFormidable Forms Integration for wpDataTables