So asking google I reached some pages where code were exposed. Some were for resizing, some were for editing, some were for adding rows and other to add columns, and finally others were for sort and reorder elements. They were so interesting alone for themselves, that I supposed that combined, they will be ashtonishing. So did I. And here is the final code (the source links from were the codes came from are referred as comments in the code).