private void Find(string value) { if (string.IsNullOrEmpty(value)) return; foreach (DataGridViewRow Row in Flex.Grid.Rows) { String strFila = Row.Index.ToString(); foreach (DataGridViewCell cell in Row.Cells) { string Valor = Convert.ToString(cell.Value); if (Valor.ToLower().Trim().Contains(value.ToLower().Trim())) { Flex.Grid.CurrentCell = Flex.Grid.Rows[Convert.ToInt32(strFila)].Cells[0]; Flex.Grid.Rows[Convert.ToInt32(strFila)].Selected = true; Flex.Grid.Select(); } } } }
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter