There is such a sorting procedure:
private void сортироватьЧастныеТаблицыToolStripMenuItem_Click(object sender, EventArgs e) { dataGridView2.Sort(dataGridView2.Columns["dataGridViewTextBoxColumn8"], ListSortDirection.Descending); } How can it be converted to a subroutine and how can it be correctly called later?