Page 2 of 2

Re: Combining two cell values and checking Active Directory.

Posted: Thu May 17, 2018 11:34 am
by jvierra
Easier than you first though. Glad you got it to work.

Re: Combining two cell values and checking Active Directory.

Posted: Thu May 17, 2018 1:01 pm
by mxtrinidad
Or, you could use column names and highlight the whole line with the cell with issue:

Code: Select all

## - Button Click event:
	:
	Update-DataGridView -DataGridView $datagridview1 -Item $x -AutoSizeColumns DisplayedCells;
	foreach ($i in $datagridview1.rows) {
		
		## - Section to highlightline and columns:
		if (($i.Cells['Name'].Value).ToString() -match 'psf') {
			$datagridview1.Rows[($i.Cells['Name']).RowIndex].DefaultCellStyle.BackColor = 'Bisque';
			$i.Cells['Name'].Style.BackColor = 'Magenta';
		}

Very cool stuff!!
:)