[英]Change FontWeight of specific row of DevExpress GridControl in WPF
[英]How to hide a specific row of devexpress GridControl?
在C#DataGrid中使用以下代碼:
dataGridView.Rows[rowIndex].Visible = false;
devexpress gridControl中的等效項是什么?
等效的是ColumnView.CustomRowFilter
事件。 您可以使用此事件隱藏特定的行。 使用RowFilterEventArgs.ListSourceRow
屬性獲取GridControl.DataSource
中記錄的索引,並將RowFilterEventArgs.Visible
屬性設置為false
,將RowFilterEventArgs.Handled
屬性設置為true
以隱藏行。
這是隱藏rowIndex
變量的示例:
private void gridView1_CustomRowFilter(object sender, RowFilterEventArgs e)
{
if (e.ListSourceRow == rowIndex)
{
e.Visible = true;
e.Handled = true;
}
}
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.