Known Is A Drop,UnKnown Is An Ocean....
Njoy Programming
Thursday, August 14, 2008
How To Remove Empty Rows In DataTable
int i = 0; while (i <= datatableid.Rows.Count - 1) { if (datatableid.Rows[i]["ColumnName"].ToString().Trim() == string.Empty) { datatableid.Rows.RemoveAt(i); } else { i += 1; } }
2 comments:
This Code is Dammmmmmmmn Good
Thanks a lot buddy!! Saved my day!
Post a Comment