Home > Net >  In the datagridview List <T> screening and operations
In the datagridview List <T> screening and operations

Time:04-20

Background:
There is a registration of sample information database, each sample information is a type T
Then List After binding DGV shows that use BindingList. Has achieved,

The actual scene:
Is the actual entry, number, type, configuration, X the number of the entry, I'll according to & lt; T> Type generation X T instance, add to the List ,

Behind me how Linq on this List or other way,

Query, the date, what type, what configuration, how many units?

This query, shown to another table, can be a listbox, according to XX, XX, XXX configuration, X,

And then I click on the record of the listbox, in DGV, show only the List of X units,

How does the screening? I want to List Or binding, but not this X rows are visible=false,

But just now I tried DGV. Rows [0]. Visible=false, an error associated with currency manager position row cannot be set to invisible, "
But the Row [1] the start of the false are allowed, confusion,

If we can use Linq to regenerate a list to bind? So I edit a good data, such as the other information I gave each X update, how to save the total List?
O master, thank you,

CodePudding user response:

List the source data and filter the list, is divided into two,
You bind the screening before List Call it A,
After screening the List
Any operation, screening is to generate a new B, then the binding to another DGV

CodePudding user response:

But I finally saved to A file, I just want A have to List A,

All changes on List B, how to quickly import to List A?

CodePudding user response:

refer to the second floor tucker heather's reply:
but I finally saved to A file, I just want A have to List A,

All changes on List B, how to quickly import to List A?


Since you are saving files that moderator said no problem, why put the list A? Will be recycled, anyway, you this list is not much, how much memory you
  •  Tags:  
  • C#
  • Related