This post was written by independent Alpha Anywhere developer David Kates. It is part 2 in a series on integrating custom controls with Alpha Anywhere. Click here to read part 1.
Overview videoNow...I’m not going to say this was easiest integration I’ve ever done...but the end result is well worth the head-scratching. I sat and looked at my screen patiently waiting for my brain to wrap around the concept of unlimited number of hierarchical nodes plus data for each node...or no data. Part of the challenge was that the TreeGrid likes it’s JSON a bit non-standard, which is ok, but it makes you work a bit harder for a great end result.
By the end of the journey and a reminder from Selwyn about some really interesting functions in Xbasic I had used no less than 10 of those functions including a5_treeTextToJSON, dump_properties, *tree_from_dependencies, *tree_to_outline, *variable_to_script, json_parse, evaluate_template, and vartojson. These functions are little bits of magic without which life would not be as much fun as it is. They, and many others like them, are indispensable for taking data from a sql source and turning and twisting that data to fit your needs.
The end result is a data tree with unlimited nodes and data per node. The data in each column can take the form of Editable data, Read-only, Text, TextArea, Radio Button, Checkbox, Dropdown, Price format, and Dynamic… which is like conditional formatting for the column.
Alpha Anywhere can easily talk to the world around it. That’s what makes it an amazing environment to work in.