Reputation: 876
in c# datagrid use this code:
dataGridView.Rows[rowIndex].Visible = false;
What is the equivalent in devexpress gridControl ?
Upvotes: 0
Views: 7745
Reputation: 6621
The equivalent is ColumnView.CustomRowFilter
event. You can use this event to hide particular rows. Use RowFilterEventArgs.ListSourceRow
property to get the index of record in GridControl.DataSource
and set RowFilterEventArgs.Visible
property to false
and the RowFilterEventArgs.Handled
property to true
to hide the row.
Here is example for hide row by rowIndex
variable:
private void gridView1_CustomRowFilter(object sender, RowFilterEventArgs e)
{
if (e.ListSourceRow == rowIndex)
{
e.Visible = true;
e.Handled = true;
}
}
Upvotes: 1