public void filterdgInventory(string token) { if (string.IsNullOrWhiteSpace(token)) { fillgdInventory(); txtSearch.Focus(); } else { inventoryTable = new DataTable(); if (rbInventory.Checked) { dbController.filterInventory(inventoryTable, token); } else if (rbPurchased.Checked) { dbController.filterPurchasedProduct(inventoryTable, token); } dgInventory.DataSource = inventoryTable; if (rbInventory.Checked) { colorCodedRows(); } else if (rbPurchased.Checked) { highlightQtySoldCells(); } } }