UI/_OnGenericDataGridSourceInitialized.ps1

function _OnGenericDataGridSourceInitialized {
    try {
        if (!($AllComputers)) {
            _UpdateObjectCache -Force
        }
    }
    catch {
        $ErrorString = 'Unable to load objects.'
        _ShowMessageBox -MessageText $ErrorString -ButtonType 'OK' -MessageIcon 'Warning' -MessageTitle 'RSOP Object Error'
    }

    foreach ($Computer in $($AllComputers | Sort-Object Name)) {
        $GenericDataGrid_ComputersComboBox.Items.Add($Computer.Name)
    }
    $GenericDataGrid_LoadingLabel.Visibility = 'Hidden'
}