private void Dgw1_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex >= 0)
            {
                string colName = Dgw1.Rows[e.RowIndex].Cells["FieldName"].FormattedValue.ToString();

                FrmColumnDetail frm = new FrmColumnDetail();
                frm.MdiParent = GlobalVar.MDIparent;
                frm.colName   = colName;
                frm.LoadData();
                frm.Show();
            }
        }
        private void dgwData_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            string colName = dgwData.Columns[e.ColumnIndex].HeaderText;

            if (e.RowIndex == -1)
            {
                FrmColumnDetail frm = new FrmColumnDetail();
                frm.MdiParent = GlobalVar.MDIparent;
                frm.colName   = colName;
                //frm.searchValue = cellvalue;
                frm.LoadData();
                frm.Show();
            }
            else
            {
                string cellvalue = dgwData.Rows[e.RowIndex].Cells[e.ColumnIndex].FormattedValue.ToString();
                txtWhere.Text = txtWhere.Text.Trim();
                string Str = (txtWhere.Text.Length == 0) ?"WHERE ":" AND ";
                txtWhere.Text = txtWhere.Text + Str + colName + "='" + cellvalue + "'";
                LoadDgwData();
            }
        }