8/29/2025 3:36:59 PM
|
|
slxdeveloper.com Community Forums |
|
|
|
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
|
|
|
|
List Views Manipulation (again!): Captions and Widths derivation!
Posted: 16 Oct 09 3:45 PM
|
This is kind of like GRID stuff deja vu......you have a recordset and maybe a caption (if it's in the grid)....but no easy way to reset a grid to a List Views specifications.
You can get the selected ID's, all of the ID's, the SQL....but no way to figure out the Formatting, Width, Alignment of each column?
Knowing that I have developed a few tools to take SQL Select statements\Record Sets and come up with pretty column captions, and the Field type (which can allow for format setting AND width).....does anyone have a quick way to determine the width.....
Maybe you walk X records of the grid and determine the max length of the field value? take that number add 10 to it and there's your width?
It's easy to set all of the INTs, Double, Currency, etc. to, say 60....but Account Type, City, State, Country, Account, Contact LastName, etc. are tougher....
So has anyone come up with a quick solution?
|
|
|
|
Re: List Views Manipulation (again!): Captions and Widths derivation!
Posted: 16 Oct 09 4:45 PM
|
Not sure I quite follow you. Are you trying to read the current Width? Or are you asking for ways to figure out a width based on the Data (or Caption)?
If you want to read existing grids properties, this would be it:
For i = 0 to DataGrid.Columns.Count Set col = DataGrid.Columns.Item(i) msgbox col.FieldName & " - " & col.Width & " - " & col.Caption & " - " & col.ReadOnly Next
If you run it through a Debugger, you could add the column variable to a Watch and then take a peek at all the properties on it.
|
|
|
|
Re: List Views Manipulation (again!): Captions and Widths derivation!
Posted: 19 Oct 09 9:35 AM
|
sorry.
I'm talking F8 ListViews/Groups, not data grids. I'm trying to create a datagrid with the correct column widths for an existing Group. Either from the data, or the listview/GroupsPane object itself.
My guess is to read a few rows and get the max length for any text columns (some kind of autowidth function).....numbers and dates I can figure out from the recordset field type. |
|
|
|
You can
subscribe to receive a daily forum digest in your
user profile. View the site code
of conduct for posting guidelines.
Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
|
|
|
|
|
|
|
|