U formu koji otvaraš kreiraj nešto kao:
Code:
public void Inicijalizacija(Int32 Id, string str1, string str2, decimal dec1, Int32 ceoBroj ...)
{
this.IzabraniId = Id;
txtString1.Text = str1;
txtString2.Text = str2;
txtDecBr1.Text = dec1.ToString();
txtDecBr2.Text = dec2.ToString();
txtIntBr.Text = ceoBroj.ToString();
}
pa prilikom kreiranja forma možeš da napišeš:
Code:
Form1 frm = new Form1();
frm.Inicijalizacija(
((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[0].Value,
((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[1].Value,
((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[2].Value,
((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[3].Value,
((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[4].Value ...);
frm.ShowDialog();
DataGridView.SelectionMode treba da bude FullRowSelect i verovatno ćeš morati ((DataGridViewRow)dgKolone.SelectedRows[0]).Cells[x].Value da konvertuješ u odgovarajuće tipove.
Pozdrav