var dataTable = (DataTable)dgvDisplayTiles.DataSource; var dataView = dataTable.DefaultView; dataView.RowFilter = string.Format("FloorTileName like '{0}%'", txtSearchByName.Text);
dgvDisplayTiles.DataSource = dataView;
Trim
txtSearchByName.Text.Trim();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)