c# - How to add an empty row to a datatable based on value from column -


i working c# 4.5 on winform. have dataset filled data sql proc uses group grouping sets has row aggregate contains value "totals" in second column. want insert empty row after each row has "totals" in column. data exported excel , want empty row between groups legibility.

thanks.

for (int = 0; < datatable.rows.count; i++)     if (datatable.rows[i][0] == "totals")         datatable.rows.insertat(datatable.newrow(), ++i); 

Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -