Created
May 29, 2013 09:35
-
-
Save forcewake/5669131 to your computer and use it in GitHub Desktop.
Delete rows from the table from dataset
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (oDs.Tables.Count > 1) | |
{ | |
oDs.Tables[1].Rows.Cast<DataRow>() | |
.Where(r => | |
r["first"].ToString() == "0" || | |
r["second"].ToString() == "5" || | |
r["third"].ToString() == "000") | |
.ToList() | |
.ForEach(row => | |
{ | |
row.Delete(); | |
row.AcceptChanges(); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment