Home Forums WPF controls Xceed DataGrid for WPF Master / Detail how to get Master data when focused on detai

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

    Hello,

    Normally if you want to get data from a row that you are focused on you can use something like this line:

    String site_name = (string)(((System.Data.DataRow)DataGridControl_Site_ID.SelectedItem).ItemArray[1]);

    I know this line will let you get the Detail value:

    create_task_window.site_name = (string)(((System.Data.DataRow)dataGridControl_Site_ID.GlobalCurrentItem).ItemArray[1]);

    But if you are focused on a Detail row on the DataGrid how do you get the Master datarow?

    Imported from legacy forums. Posted by David (had 2477 views)

    Xceed Support
    Member
    Post count: 5658

    You can check the ParentItem property of the detail’s DataGridContext.

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

    User (Old forums)
    Member
    Post count: 23064

    Thanks Jenny! Got it working now.

    😀

    Imported from legacy forums. Posted by David (had 3594 views)

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