I want to pass datagridview from this form "itemsManagement" to "editItems" form
public partial class itemsManagement : Form
{
public itemsManagement()
{
InitializeComponent();
this.ActiveForms = new Dictionary();
}
private Dictionary ActiveForms;
private void showform() where TSource : Form
{
Form form = null;
if (this.ActiveForms.ContainsKey(typeof(TSource)))
{
form = this.ActiveForms[typeof(TSource)];
form.WindowState = FormWindowState.Normal;
form.ShowDialog();
}
else
{
form = Activator.CreateInstance();
form.FormClosed += form_FormClosed;
form.ShowDialog();
this.ActiveForms.Add(typeof(TSource), form);
}
}
private void form_FormClosed(object sender, FormClosedEventArgs e)
{
this.ActiveForms.Remove(sender.GetType());
}
private void editItemToolStripMenuItem_Click(object sender, EventArgs e)
{
this.showform();
}
please help me

Nilesh ShahRank #42 · 34.2K reputationPosted Mar 5, 2017, 10:06 AM EST
mohammad amrat44 reputationPosted Mar 5, 2017, 7:57 PM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 5, 2017, 8:11 PM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 6, 2017, 5:41 PM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 6, 2017, 10:38 PM EST
{
public DataGridView dg;
{
PAL.editItems pal = new PAL.editItems();
pal.dg = dgv_items;
this.showform
mohammad amrat44 reputationPosted Mar 7, 2017, 1:54 AM EST
{
public DataGridView dg;
{
PAL.editItems pal = new PAL.editItems();
pal.dg = dgv_items;
this.showform
mohammad amrat44 reputationPosted Mar 7, 2017, 2:36 AM EST
pal.dg = dgv_items;
Rafnas T PRank #280 · 8.8K reputationPosted Mar 7, 2017, 2:39 AM EST
mohammad amrat44 reputationPosted Mar 7, 2017, 2:45 AM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 7, 2017, 2:53 AM EST
//....
this.showform
mohammad amrat44 reputationPosted Mar 6, 2017, 2:55 AM EST
mohammad amrat44 reputationPosted Mar 6, 2017, 9:04 PM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 7, 2017, 2:01 AM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 7, 2017, 2:07 AM EST
mohammad amrat44 reputationPosted Mar 7, 2017, 2:13 AM EST
Rafnas T PRank #280 · 8.8K reputationPosted Mar 7, 2017, 2:33 AM EST