<Button sx={{ mb: 1 }} onClick={handleToggleClick}>
  Toggle edit & delete
</Button>
<div style={{ height: 400 }}>
  <DataGridPro
    apiRef={apiRef}
    rows={rows}
    columns={columns}
    getRowHeight={() => 'auto'}
    initialState={{ pinnedColumns: { left: ['name'], right: ['actions'] } }}
  />
</div>