12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- using System;
- using System.Collections.Generic;
- using System.ComponentModel;
- using System.Data;
- using System.Drawing;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Forms;
- namespace WindowsFormsApp3
- {
- public partial class Form2 : Form
- {
- public Form2()
- {
- InitializeComponent();
- }
- private void Form2_Load(object sender, EventArgs e)
- {
-
- this.prodyktTableAdapter.Fill(this._12gkDataSet.Prodykt);
- }
- private void textBox1_TextChanged(object sender, EventArgs e)
- {
- for (int i = 0; i < dataGridView1.RowCount; i++)
- for (int j = 0; j < dataGridView1.ColumnCount; j++)
- {
- if (dataGridView1.Rows[i].Cells[j].Value == null)
- {
- break;
- }
- if (textBox1.Text == dataGridView1.Rows[i].Cells[j].Value.ToString())
- {
- dataGridView1.CurrentCell = dataGridView1.Rows[i].Cells[j];
- dataGridView1.FirstDisplayedScrollingRowIndex = i;
- break;
- }
- }
- }
- private void button1_Click(object sender, EventArgs e)
- {
- var Form2 = new Form1();
- Form2.Show();
- }
- }
- }
|