Can I programmatically add a row to a WPF datagrid? -
i want add new row, have datasource in objects in need processing. need below wpf datagrid...
datarow row = datatable.newrow(); foreach (navitem item in record.items) { row[item.fieldno.tostring()] = item.recordvalue; } datatable.rows.add(row);
you should using observablecollection<navitem>
datagrid source. adding new element collection add datagrid.
see msdn article.
Comments
Post a Comment