Is it possible to edit only one row of WPF DataGrid?

I have a dataset that I want to display for the user, but I want them to be able to edit the newest (first) row of data. I need to display other rows of data for reference. I do not need to store everything in one DataGrid, but I would like, if possible.

Im new to WPF, so any help / ideas are greatly appreciated!

+5
source share
2 answers

Got this, I just cancel editing any line other than the first.

private void dataGridStats_BeginningEdit(object sender, DataGridBeginningEditEventArgs e)
{
    if (e.Row.GetIndex() != 0)
    {
        e.Cancel = true;
    }
}
+8
source

, UI , datagrids . , . , .

, , , datagrids , .

0

All Articles