Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 246
  • 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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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