Probably users are not populating because after adding user your not performing acceptchanges operation on your datatable.
after (resultsTable.Rows.Add(dr))
so please update above code with this lines of code (Hear my assumption is that users are populated in searchresults (and AllResults) objects properly and problem with displaying data at runtime.
try
{
string domainAndUsername = "domain" + @"\" + "admin";
DirectoryEntry myLdapConnection = new DirectoryEntry(LdapPath, domainAndUsername, passwrd);
DirectorySearcher search = new DirectorySearcher(myLdapConnection) { Filter = ("(objectClass=user)") };
search.CacheResults = true;
SearchResultCollection allResults = search.FindAll();
DataTable resultsTable = new DataTable();
resultsTable.Columns.Add("UserID");
resultsTable.Columns.Add("EmailID");
foreach (SearchResult searchResult in allResults)
{
MembershipUser myUser = Membership.GetAllUsers()[searchResult.Properties["sAMAccountName"][0].ToString()];
if (myUser == null)
{
DataRow dr = resultsTable.NewRow();
dr["UserID"] = searchResult.Properties["SAMAccountName"][0].ToString();
if (searchResult.Properties["mail"].Count > 0)
{
dr["EmailID"] = searchResult.Properties["mail"][0].ToString();
}
else
{
dr["EmailID"] = "";
}
resultsTable.Rows.Add(dr);
}
else
{ }
}
resultstable.AcceptChanges();
grdViewAllADSUsers.DataSource = resultsTable;
grdViewAllADSUsers.DataBind();
}
catch (Exception)
{
}