This topic is locked

Settings Types

11/7/2019 3:55:45 PM
ASPRunner.NET General questions
T
Tim author

Hello,
Various things can be saved to a "settings" table, like column widths, show/hide options, export field order, etc. When I look at the settings table there is a column called "TYPE". Is there a list somewhere of what each type number refers to?
Thanks,

Tim

admin 11/13/2019

We do not have documentation on this. This is an internal settings table and the way it works can be changed. I would recommend against making changes to this table manually.

T
Tim author 11/25/2019

Thank you Sergey. Yes, I would rather not make changes to this table but I've been having problems with it. It seems that if a user has records in this table it can mess up functionality on the list page for them. For instance, they can no longer click column headers to sort (and no tool tip), they can not use the "select all" checkbox, exports don't work and just kick them back to the home page, and other seeming random things. It seems to break some javascript, which then stops executing subsequent code.
If I delete the user's records in this settings table, it often fixes all the errors. But this is a pain for the user because they then need to reset all of their customization's. My theory is that the problem is with show/hide and column order settings, but I can't be sure, so I was hoping to delete just those "types".
On a related note, I have tried to create a button that I can insert on all list pages that allow customization, and that button would allow the user to "reset" the view. The button's server code is like this:



string sql = DB.PrepareSQL("delete FROM dbo.MyApp_settings where [USERNAME] = '" + XSession.Session["UserID"].ToString() + "' and [TABLENAME] = ':session.TN';");

DB.Exec(sql);


I am setting the TN session variable in the "Before display" event of each list page. Is there a better, more universal way to get the table name of the list page I'm on so that I can reuse this button code on each list page?
And I think it'd be great if there were a built in "reset view" button on pages that allow show/hide or reordering of columns.
Thanks,

Tim

admin 11/25/2019

Hacking something behind the scene is rarely a good idea. If something doesn't work as expected contact us and we'll either help you with configuration or fix this in ASPRunner.NET.

Pete K 11/26/2019

Tim, I have also experienced stability issues when allowing certain user settings on list pages. What I have found is that allowing show/hide fields is safe, but resizable columns and reordering of fields often causes issues. I no longer check those boxes.

T
Tim author 11/26/2019

Thanks Pete, that is helpful. And show/hide is more import/useful than the reordering, so no real problem removing that.
Sergey, fair enough. I will say, though, that 9 times out of 10 when something doesn't work as expected, the problem is with my code, not ASPRunner. And if I can't consistently recreate the problem and create a small test project that highlights the issue, it's difficult for me to reach out, as many of my project are very large and use AD integration so I can't just push them to the demo site.
I will see if I can get some kind of error message from this issue by inspecting the page when it's happening to a user. If I can, I will pass that along to support.
Thanks to you both.

Tim