Advertisement
Guest User

Untitled

a guest
Mar 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.77 KB | None | 0 0
  1. private void AdmAreaFilter_Click(object sender, EventArgs e)
  2.         {
  3.  
  4.             foreach (DataGridViewCell cell in dataGridView1.SelectedCells)
  5.             {
  6.                 if (dataGridView1.SelectedCells.Count == 1)
  7.                 {
  8.                     if (cell.ColumnIndex == 4)
  9.                     {
  10.                         int k = csv.Rows.Count;
  11.                         for (int i = 1; i < k; i++)
  12.                         {
  13.                             if (currentList[i].ChiefName != cell.Value.ToString()) { csv.Rows.RemoveAt(i); i--; k--; }
  14.                         }
  15.                     }
  16.                 }
  17.  
  18.             }
  19.             currentList = Theater.CreateObjects(csv.Rows);
  20.             FullDaGrid(currentList, (int)numericUpDown.Value);
  21.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement