Support Portal

for ProcessRobot and WinAutomation

Start a new topic

Convert DataGrid Contents to DataTable

ADMIN

Extracting the contents of a UI DataGridView produces a single Text variable containing all the data in a specific format. This Process converts this Text format into a DataTable, which can be used for easier access and manipulation of the data.


Note that it is quite possible for the format to be different, depending on the application which contains the DataGridView - therefore, some tweaks may be necessary in order for this Process to function properly in every scenario.

waj

try this: 
da = new DataAdapter(); 
dt = new DataTable(); 
da.Fill(dt); 
dt.Locale = System.Globalization.CultureInfo.InvariantCulture; 
BindingSource bs = new BindingSource(); 
bs.DataSource = dt; 
dataGridView.DataSource = bs; for more information you can refer data grid content

here is no direct method to convert this to a DataTable from the DataGrid element. If you wanted to do this manually, you would have to create an instance of the DataTable, then create the rows from the Items in the DataGrid using a loop. You have to loop on DataGrid and add item to Datatable.

apache spark online training

Login or Signup to post a comment