We have known that treeview layout can be found in Chart of Account overview form. I try to learn the logic and how it works to create treeview layout. Therefore, I create a table and a form to test it.
The important thing that in table must has : No, Name, Type(Heading, Begin-Total, Posting, End-Total, Total), Indentation, and Totaling field.
For Creating treeview form from the table, we just follow the logic from Chart of Account Overview form. I think it's quite simple to do that. First, we create 7 functions :
The important thing that in table must has : No, Name, Type(Heading, Begin-Total, Posting, End-Total, Total), Indentation, and Totaling field.
For Creating treeview form from the table, we just follow the logic from Chart of Account Overview form. I think it's quite simple to do that. First, we create 7 functions :
- InitTempTable (send parameter(Yes/No) to CopyCountryToTemp function)
- ExpandAll (to expand all)
- CopyCountryToTemp (Insert table data to temporary table)
- GetEndTotal (get Totaling data from "End-Total" to "Begin-Tota"
- HasChildren (Check whether has children or not)
- IsExpanded (Check whether has already expanded or not)
- ToggleExpandCollapse (toggle for expand and collapse)
No comments:
Post a Comment