Проблема, с которой я столкнулся, заключается в том, что обе строки отображают один и тот же текст.

Как видно на прикрепленном изображении. , в обеих строках отображаются номера тренеров от C01 до C14. Однако я хочу, чтобы первая строка оставалась такой, какая она есть, а вторая строка отображала номера тренеров от C15 до C28.
Метод, который я сейчас использую:
Код: Выделить всё
private void CreateCoachCompositionDataGrid()
{
// Clear the existing columns in the data grid
dataGridCoachComposition.Columns.Clear();
// Set the margin for the data grid
dataGridCoachComposition.Margin = new Thickness(16, 468, 230, 18);
// Hide the column headers
dataGridCoachComposition.HeadersVisibility = DataGridHeadersVisibility.None;
// Set the row height
dataGridCoachComposition.RowHeight = 50; // Set this to your desired row height
// Set the vertical alignment to top to remove empty space at the bottom
dataGridCoachComposition.VerticalAlignment = VerticalAlignment.Top;
// Create 14 columns
for (int i = 1; i
Подробнее здесь: [url]https://stackoverflow.com/questions/78158112/datagrid-rows-not-able-to-display-different-values-in-wpf[/url]
Мобильная версия