We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

how to hide a particular row in a data table

poogie22
poogie22 asked
on
Medium Priority
256 Views
Last Modified: 2006-11-23
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.
Comment
Watch Question

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

Author

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
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

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
hi,
can you please give me the code.

Author

Commented:
i tried my self but couldnt.please give me the codes in detail.

Author

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.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.