TOPIC: Browse, SetQuery and Column Layout
Browse, SetQuery and Column Layout 10 Months, 2 Weeks ago

I have a Combo Box that allows me to select from a variety of customizable "Summary" queries. When a new item is selected, I call .browse.SetQuery(q). This works great, however, I am hoping to be able to save the column layout per query set. I have tried a variety of things including adding a SetColumnsSaveName() to Browse w/o any luck.

Does anyone have a hint on how I can accomplish this? Basically one "Summary" may contain fields Abc, Xyz, 123. Another may contain Def, Hij, 987. Abc may be user resized to 200px while Def may be 25px.

Thanks for any pointers,

Re:Browse, SetQuery and Column Layout 10 Months, 2 Weeks ago
From looking at BrowseControl:

You probably have to override GetColumnsSaveName

It looks like SetQuery saves the columns:

UserColumns.Save(.GetColumnsSaveName(), .list, .columns)

You want this to be the "old" name.

Then you would need to change to the "new" name and then do:

UserColumns.Load(.columns, .GetColumnsSaveName(), .list, false)

But .list and .columns are private so you will not be able to access them from outside BrowseControl. You could add a method to browse control to do the load.

That is just a rough guess.