I solved issue 1 with flag:
Appreciate who can help my second issue with provide some sample.
Thanks!
protected void btnSearch_Click(object sender, EventArgs e)
{
int flag;
string searchString = txtSearch.Text;
foreach (GridViewRow row in GridView1.Rows)
{
flag = 0;
TableCellCollection cells = row.Cells;
foreach (TableCell cell in cells)
{
if (cell.Text.ToLower().StartsWith(searchString.ToLower()))
{
flag = 1;
break;
}
}
if (flag == 0 )
{
row.Visible = false;
}
}