使用某些包含值C#WPF Linq隐藏数据网格中的行 [英] Hiding rows in datagrid with certain containing values C# WPF Linq
本文介绍了使用某些包含值C#WPF Linq隐藏数据网格中的行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试隐藏数据网格中的一行数据,其中包含来自凭据的信息。
有没有办法做到这一点?这是我尝试过的,但似乎并不接近:
I am trying to hide a row of data from my datagrid that contains information from the class Credentials.
Is there any way to do this? Here is what I have tried, but in no way seem close:
foreach (DataGridRow DR in dgEmployeeInformation.Items)
{
if (DR.Cell.Value == Credentials._eld.LoginID)
{
DR.Visible = false;
}
}
我的应用程序不会以当前使用的代码开头。如果有人可以提供帮助,我将非常感激!谢谢。
My application won't start with the current code being used. If anyone can help, I would be extremely grateful! Thank you.
推荐答案
嗨。
我建议在wpf中使用ValueConverter。
hi.
i suggest use ValueConverter in wpf.
这篇关于使用某些包含值C#WPF Linq隐藏数据网格中的行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文