It's great to have the ability to turn on and off columns. Now we need to make presets so the user can press a button to show and hide certain sets of columns easily, without opening the GUI and clicking them one by one.
Any ideas on how to do this?
David
Column presets?
Re: Column presets?
Hi,
you can add to the TABLENAME-tv.js in the hooks folder some code to add you button to there you want an upon click on the button
execute
$j('input[data-col="TABLENAME-FIELDNAME"]').click();
for each field that you want to hide.
you can add to the TABLENAME-tv.js in the hooks folder some code to add you button to there you want an upon click on the button
execute
$j('input[data-col="TABLENAME-FIELDNAME"]').click();
for each field that you want to hide.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: Column presets?
Thanks very much!
However, I'm not getting it to work. It seems not as simple as entering (in clients-tv.js) $j('input[data-col="clients-dateAdded"]').click();
As well, I would like to trigger groups of fields off/on by clicking buttons. Not sure how to achieve that aspect also.
Alternately, I'm also trying to write the cookies in LocalStorage directly. It seems like a workable method but am having difficulty with getting the exact right data into the cookie. Examining the Appgini generated cookie data in Chrome helps, but somehow can't get it formatted properly for Appgini to read it back.
Any further assistance would be greatly appreciated!
However, I'm not getting it to work. It seems not as simple as entering (in clients-tv.js) $j('input[data-col="clients-dateAdded"]').click();
As well, I would like to trigger groups of fields off/on by clicking buttons. Not sure how to achieve that aspect also.
Alternately, I'm also trying to write the cookies in LocalStorage directly. It seems like a workable method but am having difficulty with getting the exact right data into the cookie. Examining the Appgini generated cookie data in Chrome helps, but somehow can't get it formatted properly for Appgini to read it back.
Any further assistance would be greatly appreciated!
Re: Column presets?
Ok, we figured out how to write the appgini cookies in a javascript function:
localStorage.setItem('columns-clients_view', '{"clients-unsubscribe":false,"clients-dateAdded":false,"clients-companyName":true,"clients-EIN":false}');
Substitute your own actual column and table names.
We trigger these functions from buttons on the tableview, so now we have our favorite column presets.
localStorage.setItem('columns-clients_view', '{"clients-unsubscribe":false,"clients-dateAdded":false,"clients-companyName":true,"clients-EIN":false}');
Substitute your own actual column and table names.
We trigger these functions from buttons on the tableview, so now we have our favorite column presets.