I want to send the entire value of a row (if selected) to another form in C#. The datatable that I am getting is dynamic in nature and is not stored in my local application or computer, these values I am getting is directly from the server.
I have a situation where my table may have a primary key or it may also not have a primary key (because the fields are passed according to users choice). How can I send a selected row to another form?
My code:
public StudentIdSelect(DataTable dataTable)
{
InitializeComponent();
dataGridView1.DataSource = dataTable;
}