///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// private void checkFunds_btn_Click(object sender, EventArgs e) { this.Hide(); Fund_table fund_Table = new Fund_table(); fund_Table.Show(); }
private void button1_Click(object sender, EventArgs e) { Fund_table main = this.Owner as Fund_table; if (main != null) { for (int i = 0; i < main.Fund_dataGridView.RowCount; i++) { main.Fund_dataGridView.Rows[1].Selected = false; for (int j = 0; j < main.Fund_dataGridView.ColumnCount; j++) { if (main.Fund_dataGridView.Rows[i].Cells[j].Value != null) { if (main.Fund_dataGridView.Rows[i].Cells[j].Value.ToString().Contains(tbStr.Text)) { main.Fund_dataGridView.Rows[i].Selected = true; break; } } } } } }