Now I have a lot of items in a list, but I just want to show a few items,
Do not use the specified attribute of public {get; }, because this list there are other role,
What is your code?
Public class DC
{
Public int a {get; }
Public int b {get; }
Public bool show the {get; }
Public DC (int ac, int BC)
{
A=ac;
B=BC;
The show=true;
}
}
List
BindingList
DataGridViewDemo. The DataSource=lists;
Now I just want to show and show a, b, don't want him, according to do?
DataGridViewDemo. AutoGenerateColumns=false; Has been set to false
CodePudding user response:
WPF is?https://github.com/xiejiang2014/DataGrid-Attribute
See the DoNotAutoGenerateDataGridColumnAttribute