Change header window

hi, i have a datatable inside a window , after click the row of datatable I would write the header of the window id of the selected row . How?
Thank you

please upload example to Code Snippet