DataGridView DataGridViewComboBoxColumn Datasource not clearing
hi,
i have datagrid has about 2700 records in it. i'm looping each row can filter dropdown datasource on row row basis. works fine.
when close , re-open form not clearing memory form used.
as far can tell line
((datagridviewcomboboxcell)this[cell.owningcolumn.index, i]).datasource = selectdatatable(filter.datasorce, filterstring)
the select datatable code:
datatable selectdatatable(datatable dt, string searchstring) { datatable returndt = dt.clone(); returndt.beginloaddata(); foreach (datarow dr in dt.select(searchstring)) { returndt.loaddatarow(dr.itemarray, loadoption.overwritechanges); } returndt.endloaddata(); return returndt; }
im not sure if holding on datatable when doesnt need , if how clear them out.
any :)
hi,
welocme msdn forum. posting here.
could show what's data source? , please make sure filterstring changed @ run time. have made same code project, , works on own machine. think it's filterstring problem.
thanks understanding , support.
best regards,
rocky yue[msft]
msdn community support | feedback us
get or request code sample microsoft
please remember mark replies answers if , unmark them if provide no help.
Visual Studio Languages , .NET Framework > Visual C#
Comments
Post a Comment