0

I have a gridview in WPF and I can add columns to it, but I can't add row data in code behind. Because I have to wrap a listview around the gridview, am I supposed to add something to the listview instead? Its not as simple as gridview.addrow, gridview.rows.add(), etc.

chuckd
  • 13,460
  • 29
  • 152
  • 331
  • 1
    Learn MVVM before you ever write a single line of code in WPF. You don't "add a row to a GridView" in WPF because [UI is not Data](http://stackoverflow.com/a/14382137/643085). You add a new item to the underlying collection of data objects and [DataBinding](http://msdn.microsoft.com/en-us/library/ms752347.aspx) does the rest. – Federico Berasategui Oct 09 '13 at 22:06
  • 1
    @HighCore You must be getting tired of telling that to pretty much everyone who asks a question about WPF. If I were you, I'd probably be tempted to make a script to make those comments automatically :P (they never learn, do they?) – Yandros Oct 09 '13 at 22:15

0 Answers0