Here I have attached the source code of how to create Datatable objects and how to add datarow on that created datatable. For this I designed a form like the below screen shot.