PS Grid Customize option internals
PS uses ‘PSUSEROBJTYPE’ data dictionary to store the user’s customization.
PTCUSTOMFORMAT stores the data in the below format and pipe symbol as the delimiter.
Format explanation
Header delimiter hide/unide delimiter Freeze/UnFreeze delimiter Sort Asc/Desc delimiter Sorting order# columnnumber Footer
Delimiter = Pipe symbol
Header = 0
hide/unide = 1 – Hide Field , 0 – Unhide Field
Freeze/UnFreeze = 1 – Freeze Field, 0 – Unfreeze Field
Sort Asc/Desc = No sort order, 1 – Sort by ascending, 2 – Sort by Descending
Sorting order = 0/1/2…
Column specifier = # column number
Footer = 0#
Example:
Suppose a grid as 7 columns, when the user customizes the grid, below is the sample format.
1. Department level1 code is made hidden.
2. Sort order and Department level2 code are in Sort order list and department level 2 code is set as descending
The format would be
0|0|0|1|1#1|1|0|0|0#2|0|0|2|2#3|0|0|0|0#4|0|0|0|0#5|0|0|0|0#6|0|0|0|0#7|0|0|0|0#
PTCUSTOMFORMAT stores the data in the below format and pipe symbol as the delimiter.
Format explanation
Header delimiter hide/unide delimiter Freeze/UnFreeze delimiter Sort Asc/Desc delimiter Sorting order# columnnumber Footer
Delimiter = Pipe symbol
Header = 0
hide/unide = 1 – Hide Field , 0 – Unhide Field
Freeze/UnFreeze = 1 – Freeze Field, 0 – Unfreeze Field
Sort Asc/Desc = No sort order, 1 – Sort by ascending, 2 – Sort by Descending
Sorting order = 0/1/2…
Column specifier = # column number
Footer = 0#
Example:
Suppose a grid as 7 columns, when the user customizes the grid, below is the sample format.
1. Department level1 code is made hidden.
2. Sort order and Department level2 code are in Sort order list and department level 2 code is set as descending
The format would be
0|0|0|1|1#1|1|0|0|0#2|0|0|2|2#3|0|0|0|0#4|0|0|0|0#5|0|0|0|0#6|0|0|0|0#7|0|0|0|0#
3 comments:
-
Marvelous post! great work.
-
This post is great! Thank you!
-
What if PTCUSTOMFORMAT starts with 2 and not with 0.. ideally as per your post, header 0 is always the format. I have few of CUSTOMFORMAT starts with 2..could you please clarify.
Subscribe to:
Post Comments (Atom)