I am trying to apply a search on a datarepeater list but when i change the datasource my textbox looses focus and even if
i set the focus by code after the search or set the focus after the changedatasource event the textbox still looses the foucs.
This is my code:
if (txtSearch.Text.Length > 0)
{
var part = parts.Where(x => x.SearchPart.Contains(txtSearch.Text));
drCatalog.DataSource = part.ToList();
}
else
{
drCatalog.DataSource = parts;
}
See how text looses focus when datasource is changed