Answer the question
In order to leave comments, you need to log in
DataGrid row number?
It is necessary to write down in a variable a line which I lead its number.
In this case, record only certain data.
DataRowView row = (DataRowView)gvData.SelectedItems[0];
kj += row["ФИО"].ToString()+":";
kj += row["АДРЕС"].ToString()+"\n\r";
Answer the question
In order to leave comments, you need to log in
You can get a row by number using an indexer:
var rowIndex = 2; // индекс первой строки равен 0
var row = (SomeType)DataGrid.Items[rowIndex];
row.SomeProperty = "...";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question