Home Forums WPF controls Xceed DataGrid for WPF How to programmatically add data to dataGrid from v. 2.0

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #26281 |

    I wanted to use DataGridControl as it described in article from your site: http://doc.xceedsoft.com/products/Xceedgrid/Building_an_unbound_hierarchical_master_detail_grid.html

    But, after I’d read this article, I tried to do the same thing with Grid for WPF v.2.0… But there is no DataRows property anymore! So I’m really stunned now – I don’t understand how to add rows to dataGrid from code…

    P.S. Binding to some source is not suitable for me – data will arrive from dedicated server..

    Imported from legacy forums. Posted by Alexander (had 2354 views)

    Xceed Support
    Member
    Post count: 5658

    I think you may have the WinForms grid and the WPF grid mixed up…

    That said, if you want to use the WPF grid with master/detail, you will need to provide your data through a DataGridCollectionView (DataGridCollectionViewSource in XAML). Detail relations will be automatically detected in the case where your DataTable has DataRelations, or if your data items implement the IEnumerable interface, or if properties in your data source are maked with the PropertyRelation attribute, which indicates that the detail data is exposed by that property.

    I suggest you take a look at the Master/Detail examples in the How-to section of the documentation.

    Imported from legacy forums. Posted by Jenny [Xceed] (had 234 views)

    User (Old forums)
    Member
    Post count: 23064

    Oh, mestupid…. Thanks a lot for advice.

    Imported from legacy forums. Posted by Alexander (had 3599 views)

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.