title: How I can call function with one parameter (DataGrid or DataGridComboBoxColumn)?
body: <p>I write code and want call function with one parameter (DataGrid or DataGridComboBoxColumn).
  How I can do this ?</p>
  
  <pre><code> public void dyscyplina_pobierz(DataGrid dg) //or DataGridComboBoxColumn
          {
              String tresc = "Data source=ADAM_LAPTOP; Integrated Security=true; Database=astruzik";
              SqlConnection conn = new SqlConnection(tresc);
              SqlCommand polecenie = new SqlCommand("select Nazwa from Dyscyplina order by Nazwa ASC", conn);
              SqlDataAdapter adapter = new SqlDataAdapter(polecenie);
              DataSet ds = new DataSet();
              adapter.Fill(ds, "Dyscyplina");
              DataRow napis = null;
              if (flags1 == false)
              {
                  int licznik = ds.Tables["Dyscyplina"].Rows.Count;
                  for (int i = 0; i &lt; licznik; i++)
                  {
                      napis = ds.Tables["Dyscyplina"].Rows[i];
                      listadyscyplina.Add(napis.ItemArray.GetValue(0).ToString());
                  }
              }
              dg.ItemsSource = listadyscyplina;
              flags1 = true;
          }
  </code></pre>