Current filter:
                                You should refresh the page.
                                  • I have two grids, A and B. Every record in A has 0 or more children in B.
                                    I created relationships between the tables:
                                                    DataRelation fkAB = new DataRelation("FK_A_B", dtA.Columns["IDField"], dtB.Columns["IDField"]);
                                                    dsTradeData.Relations.Add(fkAB);
                                    But what I want is whenever I click on a record in table A, to see all of the children (if they exist) in table B. Is there a best practice on how to accomplish this in WPF? Thanks.

                                • Marina (DevExpress Support) 10.14.2010

                                  Hello Salmaan,
                                  Thank you for the question. I have created a sample. In this sample, I illustrate the best way to implement this functionality:
                                  How to implement the Master-Details functionality with two GridControls. Please review it, and let me know if you need further assistance.
                                  Thank you, Marina

                                • Salmaan Shikari 10.14.2010

                                  Marina,
                                  Thank you very much for your sample. However while I was waiting for your response, I played around with it and was able to get close to what I wanted by using this event: TableView_SelectionChanged(). In that event I got the selected rows, filtered the child table's DataTable based on those selected rows and set it as the DataSource of the child table.
                                  I think your approach is a better fit for my needs because the FocusedRowChanged event is for only one row not many.
                                  As an aside, I noticed that the TableView_SelectionChanged() only fires if the "multi select" property for the gridview is checked. Does that mean the event is meant to only handle multi - row selection?
                                  Anyway thanks for your help.

                                • Marina (DevExpress Support) 10.14.2010

                                  Hello Salmaan,
                                  Thank you for the feedback. Yes, you are right the TableView.SelectionChanged event is raised only when multi selection is enabled. I believe the solution with the FocusedRowChanged is more suitable for this task. Let me know if you need further assistance.
                                  Thank you, Marina

                                0 Solutions

                                Creation Date Importance Sort by