[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

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.
0
poogie22
Asked:
poogie22
  • 4
  • 3
1 Solution
 
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
 
jeebukarthikeyanCommented:
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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
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

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now