how to hide a particular row in a data table

how to hide a particular row in a data table

my codes are as follows:
      for (int i=0;i <= Pos+1;i++)
      {
      mainWindowTable.NewRow();
//      drBlank = mainWindowTable.NewRow();
      mainWindowTable.Rows.InsertAt(drBlank,Diff);
      Diff=Diff+1;
                Pos=Pos-1;
      }

in the above codes i am adding a set of new rows(drBlank) ,my question is how to make these set of new rows just added invisible.
poogie22Asked:
Who is Participating?
 
jeebukarthikeyanConnect With a Mentor Commented:
hi,

u can get the added rows
DataSet DS = dataset2.GetChanges(DataRowState.Added)

create a dataview on the ds
System.Data.DataViewRowState.Added

b u d d h a
0
 
jeebukarthikeyanCommented:
hi,

u want to hide the newly added rows noto be displayed in any control
is it like that

b u d d h a
0
 
poogie22Author Commented:
hi,
thanks for your reply.
yes i want to hide the set of rows(drBlank).this datatable is the datasource of a datagrid i dont want to display the above rows in the grid
0
The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

 
poogie22Author Commented:
hi,
can you please give me the code.
0
 
poogie22Author Commented:
i tried my self but couldnt.please give me the codes in detail.
0
 
poogie22Author Commented:
what i intend to do is the newly added rows that is drBlank will be there but it will be hidden.i dont want to remove those rows i am adding blank invisible rows because my application was giving some error.
0
 
jeebukarthikeyanCommented:
0
All Courses

From novice to tech pro — start learning today.