Posted: 29 May 2018 2:14 EDT Last activity: 6 Nov 2018 20:02 EST
How to populate data table obtained from website in web form using trigger button?
I am extracting data table from Pega website which has been created using HTML table designer. I want to populate that data table in datagridView when I click on submit button. Will someone help me with how to do this? I am attaching screenshot.
The tableSection (TS) on the HTML table has a method called getTable that returns a DataTable. You can set this as the DataSource property on your DataGridView (DGV). The problem will be that once you navigate away from the page, the DGV will clear as the data is now gone. If you want it to stay, you'll need to make a copy of it. I would create a LookupTable with the same signature as the DataTable coming out of the table section and call the ReplaceTable method of the LookupTable; passing it the result of getTable from the table section. You can then bind this to your DGV via a TableView, or by setting the DataSource property as I have shown in my screenshot.