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();
}
}
 
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
 
Back
Top