I am converting a DataGridView to DataTable for some uses in WPF MVVM.
Now, I have this code using the DataGridView with dgvSample
as the DataGridView:
foreach(var transaction in transactionlist)
{
dgvSample.Rows[0].Tag = transaction;
}
Since I am going to store the datagrid content in a DataTable, I have to do something like the following with dtSample
as the datatable.
dtSample.Rows[0].Tag = transaction;
And I am having an error since tagging is not available in datatable rows. Is there any possible alternative of doing this?
Thank you!