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
Rafnas T PPosted Mar 7, 2017, 7:53 AM
//....
this.showform
mohammad amratPosted Mar 7, 2017, 7:45 AM
Rafnas T PPosted Mar 7, 2017, 7:39 AM
mohammad amratPosted Mar 7, 2017, 7:36 AM
pal.dg = dgv_items;
Rafnas T PPosted Mar 7, 2017, 7:33 AM
mohammad amratPosted Mar 7, 2017, 7:13 AM
Rafnas T PPosted Mar 7, 2017, 7:07 AM
Rafnas T PPosted Mar 7, 2017, 7:01 AM
mohammad amratPosted Mar 7, 2017, 6:54 AM
{
public DataGridView dg;
{
PAL.editItems pal = new PAL.editItems();
pal.dg = dgv_items;
this.showform
Rafnas T PPosted Mar 7, 2017, 3:38 AM
{
public DataGridView dg;
{
PAL.editItems pal = new PAL.editItems();
pal.dg = dgv_items;
this.showform
mohammad amratPosted Mar 7, 2017, 2:04 AM
Rafnas T PPosted Mar 6, 2017, 10:41 PM
mohammad amratPosted Mar 6, 2017, 7:55 AM
Rafnas T PPosted Mar 6, 2017, 1:11 AM
mohammad amratPosted Mar 6, 2017, 12:57 AM
Nilesh ShahPosted Mar 5, 2017, 3:06 PM