the first form
CODE
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace Data_Shop_Details
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
this.sp_xMagazinSelectTableAdapter.Fill(this.mysqlDataSet1.sp_xMagazinSelect);
}
private void CodGest_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"CodGest like '%" + CodGest.Text + "%'";
}
private void NumeGest_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"Numegest like '%" + NumeGest.Text + "%'";
}
private void Zona_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"Zona like '%" + Zona.Text + "%'";
}
private void CodJudet_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"Codjudet like '%" + CodJudet.Text + "%'";
}
private void TipGest_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"TipGest like '%" + TipGest.Text + "%'";
}
private void IpClass_TextChanged(object sender, EventArgs e)
{
spxMagazinSelectBindingSource.Filter =
"IpClass like '%" + IpClass.Text + "%'";
}
private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e)
{
Form2 frm;
frm = new Form2();
frm.Show();
}
}
}
----------------------------------------------------------------------------
The 1st Form Designer Code:
CODE
namespace Data_Shop_Details
{
partial class Form1
{
/// <summary>
/// Required designer variable.
/// </summary>
private System.ComponentModel.IContainer components = null;
/// <summary>
/// Clean up any resources being used.
/// </summary>
/// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
protected override void Dispose(bool disposing)
{
if (disposing && (components != null))
{
components.Dispose();
}
base.Dispose(disposing);
}
private mysqlDataSet mysqlDataSet1;
private System.Windows.Forms.DataGridView dataGridView1;
private System.Windows.Forms.BindingSource spxMagazinSelectBindingSource;
private Data_Shop_Details.mysqlDataSetTableAdapters.sp_xMagazinSelectTableAdapter sp_xMagazinSelectTableAdapter;
private System.Windows.Forms.TextBox NumeGest;
private System.Windows.Forms.TextBox Zona;
private System.Windows.Forms.TextBox CodJudet;
private System.Windows.Forms.TextBox TipGest;
private System.Windows.Forms.TextBox IpClass;
private System.Windows.Forms.TextBox CodGest;
private System.Windows.Forms.Label Filter;
private System.Windows.Forms.DataGridViewButtonColumn codGestDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn numeGestDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn zonaDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn codJudetDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn tipGestDataGridViewTextBoxColumn;
private System.Windows.Forms.DataGridViewTextBoxColumn ipClassDataGridViewTextBoxColumn;
}
}
---------------------------------------------------------------------------------------------------------------------------------------
QUOTE
Possible? If I understand your question correctly, yes.
Hopefully I understood you correctly, but what you probably want to do add an event to the button on the first form. The method will create a new new form. What you can do is, in the non-default constructor for the new form, add an argument for the parameter you want to pass from the first form.
Hopefully this makes sense, and hopefully it is a half-decent solution =P.
Please post some code so that others will be able to pitch in.