stephen.pearson
I know drewfoglia already answered your question, however, I was in the midst of crafting a response so I'll just put it forth for what its worth.
First, in my opinion the datatable itself can already be thought of as an object.
dt1 = NewTable() - Creates new "instance" of Datatable
ShowProperties(dt1) - Show all the "properties" and "methods" for the Datatable object dt1.
One can think about "extending" the existing Datatable Object with additional properties and methods, as in Drew's reply. I thought about having additional features like:
1. Rowstate Handler.
2. Column and Row, Add/Delete detection.
3. Table cell change history.
4. Databox (Displaybox)
So, a possible "constructor" for the DatatableObject could look like, where member variables and functions are declared. (note the Expr( New Namespace() ).
The idea behind declaring the object this way, is not only establish a replicable entity, but also allows one to clearly see the functions and expression names that will become usable once they are fully defined.
12610_Screen Shot 2016-08-25 at 12.32.23 PM.png
My version of the NewDatatableObject (partial listing). Here is where the member functions are actually defined:
12611_Screen Shot 2016-08-25 at 12.31.20 PM.png
12621_Screen Shot 2016-08-25 at 1.17.43 PM.png
So for example, we create 2 separate instances of DatatableObject:
12612_Screen Shot 2016-08-25 at 12.47.23 PM.png
These tables now have "extended" properties built-in. In this example, some table actions are tracked, such as detecting row selection and Column/Row deletions.
12620_Screen Shot 2016-08-25 at 1.07.03 PM.png
12613_Screen Shot 2016-08-25 at 1.06.06 PM.png
One can imagine a host of other useful functions as well, that could be implemented using this method.
PDB