Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

To conceal records from the datagrid that have an "active" status in the workflow, you can use a condition to filter out those records.

Here's an example code in C#:

// Assuming the datagrid is called dataGridView1
// The workflow status column is called "status" 
// Active status is marked as "A"

foreach (DataGridViewRow row in dataGridView1.Rows)
{
    string status = row.Cells["status"].Value.ToString();
    if (status == "A")
    {
        dataGridView1.Rows[row.Index].Visible = false;
    }
}

This code loops through each row in the datagrid and checks if the status column's value is "A". If it is, the row's visibility is set to false, effectively hiding it from the user's view.

You can modify this code according to your specific needs, such as changing the column name or the status value.