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

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -

YouTubePlayerFragment cannot be cast to android.support.v4.app.Fragment -