How to Remove or Hide a row in datagrid?

  • Thread starter Thread starter Alen Oblak
  • Start date Start date
A

Alen Oblak

Like this (suppose you have a DataTable Table1):

foreach( DataRow myRow in Table1.Rows)
{
if( condition_to_remove == true)
{
myRow.Delete();
}
}
 
How I can remove or hide a row datagrid without removing
from database ?
 
Hi,
Bind your datagrid to a DataView that is based on the DataTable. The DataView has Sort and Filter properties. Setting the filter to
your needs will suppress the rows you don't want to see.
Ulrich
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top