Search code examples
c#wpfmvvmwpfdatagrid

Datagrid "Addrow" in GroupItem


I want to let the user add cells in a datagrid.

When i add a Row. I want to set the row to the Group.

enter image description here

So the "Add-Row" should be in each group.

Is there some way to realize this?


Solution

  • While adding the Row, Fill the corresponding field to the group which you need to add the new row..

    var row = _dataSet.Tables[tableName].NewRow();
    row[columnName] = "group name";