Preview: (Auto-) Hiding table columns in children tabs of DV

In this preview of the next version of AppGini Helper Javascript Library I show the new function "autoHide" for columns of children tabs.

Please note that the functions shown here will be available by the end of 2020, probably

The problem with too many columns

As you may already know a master record may have detail records in a different table. AppGini can generate tabs for each detail table and will show the tabs below the master record's data.

You can see there may be many columns in the children tab table. There are a few CSS tricks to hide columns you don't need. And in next version there will be two smart solutions for hiding columns.

Solution 1: Auto hide according to user preferences

When we open that details-table in table view, users can configure the columns they want to see by using the column-selector at the top-right:

Wouldn't it be great if those user preferences would apply to the children tabs table of the detail-view, too?

Just add that one line of code to your hooks-dv file of your master table:

// file: MASTERTABLE-dv.js
AppGiniHelper.DV.getChildrenTabs().autoHide("tasks");

Next time the hidden colors of table view will also be hidden in children tabs of a master record:

Solution 2: Hide columns by (javascript-) code

Instead of applying user preferences of table view we can also programmatically hide specific columns:

Hiding a single column:

// file: hooks/MASTERTABLE-dv.js
var subtable_name = "tasks";
var subtable_column ="created_by";

AppGiniHelper.DV.getChildrenTabs().hide(subtable_name, subtable_column);

Hiding multiple columns:

// file: hooks/MASTERTABLE-dv.js
var subtable_name = "tasks";
// array of column names
var subtable_columns = ["created_by", "created_on", "modified_by", "modified_on"]; 
AppGiniHelper.DV.getChildrenTabs().hide(subtable_name, subtable_columns);

Do you like it?