[SOLVED] Grids: Retain column config with SAVE STATE. Error saving.

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

[SOLVED] Grids: Retain column config with SAVE STATE. Error saving.

Post by Jaymer »

When showing the Column menu, we can allow users to show/hide columns.

THE "SAVE STATE" Panel Operation is supposed to allow saving of the selected columns and their order. See here: https://www.awareim.com/forum/viewtopic.php?f=1&t=8488
I've even confirmed in the past that it works, but something is making it NOT work on 8.4

I can click "Save State" and get the confirm dialog, but after logging in, my main tab reverts to default view.
IT DOES NOT SEEM TO WORK ANYMORE.

Does anyone else use this?
What would prevent it from working?
My Query has NO scripts in play. Nothing funky.
Where do these settings get stored? browser cookie?
Last edited by Jaymer on Tue Nov 17, 2020 8:27 pm, edited 4 times in total.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
ACDC
Posts: 1138
Joined: Sat Jun 30, 2007 5:03 pm
Location: California, USA

Re: Grids: Retain selected columns & ordering across sessions? SAVE STATE works?

Post by ACDC »

Where do these settings get stored? browser cookie?
I think they are stored in a system created table in the DB: Bas_User_Prefs... just guessing though :)
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: Grids: Retain selected columns & ordering across sessions? SAVE STATE works?

Post by himanshu »

I think they are stored in a system created table in the DB: Bas_User_Prefs...
That is correct.

when application loaded it pulls all the data of every grid initially and used later on specific grid when needed to show last saved state.

Just do a hard reload to your browser or clean cache, it might help.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Grids: Retain selected columns & ordering across sessions? SAVE STATE works?

Post by Jaymer »

so you guys are saying that this works in the current product?

I'll make a new, simple Query to try again.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Grids: Retain selected columns & ordering across sessions? SAVE STATE works?

Post by Jaymer »

My issue was solved by looking at the Server Output window while doing a SAVE STATE.
There was a SQL truncation error because the Kendo string that needs to be saved was too long to fix in Aware's field.
I had to modify BAS_Users_Prefs and change PrefValue to VARCHAR(MAX)
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
tford
Posts: 4238
Joined: Sat Mar 10, 2007 6:44 pm

Re: [SOLVED] Grids: Retain column config with SAVE STATE. Error saving.

Post by tford »

^^ is that basically an Aware bug, Jaymer?
Tom - V8.8 build 3137 - MySql / PostGres
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: [SOLVED] Grids: Retain column config with SAVE STATE. Error saving.

Post by himanshu »

It is not a bug but if you have a huge columns in one grid..then this could be fall into truncation error.. grid state settings get saved into table column which has initial size.. so increasing the size of the VARCHAR will resolve the issue.
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: [SOLVED] Grids: Retain column config with SAVE STATE. Error saving.

Post by Jaymer »

@Tom
Aware's default size is 3000 bytes.
I wouldn't say its a bug, its no diff than any of us have done, estimating the length of a field figuring it would hold all possible values.
You can see all the 'crud' in this string... here's data for just one field:
"sortable":true,"field":"date_received","stateId":"date_received","format":"MM/dd/yyyy","width":80,"title":"Received","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"headerAttributes":{"id":"ae3b6509-b129-4a35-89c9-7159c1f0ad94"}},{"encoded":false,"attributes":{"style":"text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.date_sold ? ' k-dirty-cell' : '' #"}

So, as you get more columns in the grid this data grows and just surpasses the 3000 chars.
It stumped me for a bit, cause I thought I had seen this work before.
And it worked in a new test grid.
Luckily I checked my Server output and that solved it.

Its just an oversight and I'm sure Vlad will handle it someone.
Jaymer...


Code: Select all

{"columns":[{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.sc_Cust ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"sc_Cust","stateId":"sc_Cust","title":"Owner","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"1ad75b61-421a-4afa-af8a-c23e1c1776dc"}},{"encoded":false,"attributes":{"style":"text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.date_received ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"date_received","stateId":"date_received","format":"MM/dd/yyyy","width":80,"title":"Received","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"headerAttributes":{"id":"ae3b6509-b129-4a35-89c9-7159c1f0ad94"}},{"encoded":false,"attributes":{"style":"text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.date_sold ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"date_sold","stateId":"date_sold","format":"MM/dd/yyyy","width":80,"title":"Sold","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"headerAttributes":{"id":"b3f856de-bab1-440a-a75c-82cf59745567"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.sc_Make ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"sc_Make","stateId":"sc_Make","title":"Make","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"06a96d8a-df1d-42a6-9eba-6380940ce562"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.sc_Model ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"sc_Model","stateId":"sc_Model","title":"Model","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"0c360dbe-bcf4-4a29-a3fc-daa86a00054f"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.Category ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"Category","stateId":"Category","title":"Category","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"d30ff2d9-4bbd-46fe-af38-27368b1a2985"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.SerialNum ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"SerialNum","stateId":"SerialNum","title":"Serial#","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"25657cf0-360a-48b2-b165-eaf5bb2d04e6"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.EIN ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"EIN","stateId":"EIN","title":"OEM EIN","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"874ea823-372c-42c6-80b1-84c916c6750c"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.doc_num ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"doc_num","stateId":"doc_num","title":"Doc #","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"66144b54-d669-486c-980b-f6fd64e6437a"}},{"encoded":false,"attributes":{"style":"text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.DateLastMovement ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"DateLastMovement","stateId":"DateLastMovement","headerAttributes":{"id":"8c32454a-9c30-4f24-9189-6ae9d391b6ea","style":"text-align: center;"},"format":"MM/dd/yyyy","width":90,"title":"Last Move","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.sc_Warehouse ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"sc_Warehouse","stateId":"sc_Warehouse","title":"Wareh.","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"cc61d40a-d89c-412a-9310-c6dcb71f1d8d"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.sc_Loc ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"sc_Loc","stateId":"sc_Loc","title":"Loc","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"5285d9ec-f9d0-4a6f-aad3-48e68fbf37fa"}},{"encoded":false,"attributes":{"style":"text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.LoanerYN ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"LoanerYN","stateId":"LoanerYN","width":60,"title":"Loan","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"headerAttributes":{"id":"011de549-d06f-4184-9cd8-95f9cec0caf2"}},{"encoded":false,"attributes":{"style":"text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.Disposition ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"Disposition","stateId":"Disposition","width":80,"title":"Disposition","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"headerAttributes":{"id":"6898daac-d826-4d5b-9bba-5bf674c65ab5"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.date_disposed ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"date_disposed","stateId":"date_disposed","format":"MM/dd/yyyy","title":"Date Disposed","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"headerAttributes":{"id":"de2aa906-3d8f-442d-95c1-d56032bf6a91","style":"display:none"},"footerAttributes":{"style":"display:none"}},{"encoded":false,"attributes":{"style":"text-align: right; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.proposed_sale_price ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"proposed_sale_price","stateId":"proposed_sale_price","headerAttributes":{"id":"fbd7304d-7ac0-4f14-9f19-3656497a4249","style":"text-align: right;"},"format":"#.00","isNumber":true,"width":60,"title":"Sale","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: right; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.TotalCost ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"TotalCost","stateId":"TotalCost","headerAttributes":{"id":"6a90d144-0fa4-4230-b4c2-efce43613c2f","style":"display:none;text-align: right;"},"format":"$###,###.00","isNumber":true,"width":60,"title":"Total Cost","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.Category_Scope ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"Category_Scope","stateId":"Category_Scope","title":"Category Scope","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"d84397fd-2675-4f9a-ba84-180bb8ae83be","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.Condition ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"Condition","stateId":"Condition","title":"Condition","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"ccbd5e4e-6514-465d-bd56-0926008f5e92","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.CustEIN ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"CustEIN","stateId":"CustEIN","title":"Cust EIN","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"fc909846-886b-44c4-a734-8aa806d91651","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.DateCreated ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"DateCreated","stateId":"DateCreated","format":"MM/dd/yyyy HH:mm","title":"Date Created","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"1aabf615-3a77-4d38-b338-be32c58402d4","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.Description ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"Description","stateId":"Description","title":"Description","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"14c0bda8-5651-4c6f-ab1a-a0974b796dc2","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.ItemRef ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"ItemRef","stateId":"ItemRef","title":"Item Ref","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"96f8a13b-12e2-42ae-a052-28bba76a0951","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: right; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.LoanerSellPrice ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"LoanerSellPrice","stateId":"LoanerSellPrice","format":"$###,###.00","isNumber":true,"title":"Loaner Sell Price","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"cef236e6-ee5a-4604-bb5b-a37f6a04469d","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.MakeModel ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"MakeModel","stateId":"MakeModel","title":"Make Model","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"0a388472-2d02-41b8-93d8-f9858dd9eb28","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.PHI ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"PHI","stateId":"PHI","title":"PHI","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"a0fda3f2-68fb-428e-8b80-df7e25df9cc5","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: right; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.PurchasePrice ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"PurchasePrice","stateId":"PurchasePrice","headerAttributes":{"id":"298bafb0-054e-4849-81fb-d57341f0ea3f","style":"display:none;text-align: right;"},"format":"#.00","isNumber":true,"title":"Purchase$","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: center; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.RequireAccessoriesYN ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"RequireAccessoriesYN","stateId":"RequireAccessoriesYN","title":"ReqAcc","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"eq"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"7bd084d3-04f7-4b9f-9087-492fc2d7a4c5","style":"display:none"}},{"encoded":false,"hidden":true,"attributes":{"style":"display:none;text-align: left; white-space:nowrap;","class":"#= data && data.dirty && data.dirtyFields && data.dirtyFields.other_id_num ? ' k-dirty-cell' : '' #"},"sortable":true,"field":"other_id_num","stateId":"other_id_num","title":"other id num","filterable":{"cell":{"showOperators":false,"minLength":1000,"operator":"contains"}},"exportable":true,"footerAttributes":{"style":"display:none"},"headerAttributes":{"id":"dcb2ca61-9756-40e2-a5e3-e087972e770c","style":"display:none"}}]}
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply