To open a window with the detail datagrid inside it, please move the datagrid component into the window component. In order to load data for datagrid, just call 'load' method with some request parameter values.
<div id="win" class="easyui-window" style="width:800px;height:400px">
<table id="tt_dt"class="easyui-datagrid" title="Dettagli" style="width:700px;height:250px"
data-options="singleSelect:true,collapsible:true,url:'Order_get_details.php',method:'post'">
<thead>
<tr>
<th data-options="field:'ID_O',width:80">ID_O</th>
<th data-options="field:'Codice',width:100">Codice</th>
<th data-options="field:'Descrizione',width:80,align:'right'">Descrizione</th>
<th data-options="field:'Quantita',width:80,align:'right'">Quantità </th>
</tr>
</thead>
</table>
</div>
<script>
function openDett()
{
var row = $('#tt').datagrid('getSelected');
if (row){
$('#win').window('open');
$('#tt_dt').datagrid('load',{id:row.id});
}
}
</script>