It colors only one line in red for the reason that you take FirstOrDefault - this means that as a result we get either one line or null if the item is not found (the default value is Default ).
Therefore, we slightly modify your code as follows:
var indexFilter = cbFilterSearch.SelectedIndex; // вынес для удобства var findResult = UsersDataGridView.Rows.Cast<DataGridViewRow>() .Where(x => x.Cells[indexFilter].Value.ToString().Contains(tbSearch.Text)).ToList(); // меняем цвет так (по Вашему примеру) for (int index = 0; index < findResult.Count; index++) { findResult[index].DefaultCellStyle.BackColor = Color.Red; } // или меняем цвет вот так (немного удобнее) foreach (DataGridViewRow row in findResult) { row.DefaultCellStyle.BackColor = Color.Red; }
Simply, we replaced FirstOrDefault with Where(predicate).ToList() and instead of a single element - got a collection of elements that satisfy the search condition.
Regarding the second question, you can offer this version of LINQ :
UsersDataGridView.Rows .Cast<DataGridViewRow>() .ToList() .ForEach(x => x.DefaultCellStyle.BackColor = Color.White);
Rows 's transform the Rows element from the DataGridViewRowCollection type to the list of DataGridViewRow elements and change the BackColor value of each collection element in the ForEach loop.