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

Popular posts from this blog

ASP.NET/SQL find the element ID and update database -

jquery - appear modal windows bottom -

c++ - Compiling static TagLib 1.6.3 libraries for Windows -