I got this:
DataTable dtEntity = CreateDataTable(); drEntity = dtEntity.NewRow();
Then I add data to the row (or not). Lots of code, real
To delete null and also empty entries Try this
foreach (var column in drEntitity.Columns.Cast().ToArray()) { if (drEntitity.AsEnumerable().All(dr => dr.IsNull(column) | string.IsNullOrEmpty( dr[column].ToString()))) drEntitity.Columns.Remove(column); }