private void propertyGridControl1_CustomPropertyDescriptors(object sender, DevExpress.XtraVerticalGrid.Events.CustomPropertyDescriptorsEventArgs e)
{
if (e.Context.PropertyDescriptor == null)
{
PropertyDescriptorCollection filteredCollection = new PropertyDescriptorCollection(null);
foreach (PropertyDescriptor item in e.Properties)
{
//将“杂项”下的属性移除
if (item == null || item.Category == "杂项") continue;
filteredCollection.Add(item);
}
e.Properties = filteredCollection;
}
}
Dev PropertyGridControl控件 移除某一Category下的属性
猜你喜欢
转载自blog.csdn.net/sinat_32857543/article/details/97130898
今日推荐
周排行