In my project. I have two DataTables: DTA,DTB.
I try do:
Dataview view=new dataview(DTA);
datagridview1.d atasoruce=view;
view=new dataview(DTB);
datagridview2.d atasource=view.
I found both datagridview1 and datagridview2 are working. the datagirdview1 still display the data in DTA and datagridview2 display the datat in DTB.
I think after I set view=new dataview(DTB), the dataview still exists that created by Dataview view=new dataview(DTA); how could I release this dataview when I don't need it? thank you.
Otherwise DTA will have many dataview when I load the page many times.
I try do:
Dataview view=new dataview(DTA);
datagridview1.d atasoruce=view;
view=new dataview(DTB);
datagridview2.d atasource=view.
I found both datagridview1 and datagridview2 are working. the datagirdview1 still display the data in DTA and datagridview2 display the datat in DTB.
I think after I set view=new dataview(DTB), the dataview still exists that created by Dataview view=new dataview(DTA); how could I release this dataview when I don't need it? thank you.
Otherwise DTA will have many dataview when I load the page many times.
Comment