G
Guest
Hi there,
I´m using the rowFilter property for filtering the rows in a DataView
object. If the filter is set to an inexistent value , that is, after
filtering i have 0 rows in the DataView, and I try to re-show all the rows
again by setting rowFilter = "", after setting the rowStateFilter i obtain
the "Index was outside the bounds of the array",.
If the dataview is not empty this code works fine. Here is the code:
currentView.RowFilter = stringFilter;
currentView.RowStateFilter = System.Data.DataViewRowState.CurrentRows;
if (currentView.Count == 0)
{
currentView.RowFilter = "";
}
Application.DoEvents();
I´m using the rowFilter property for filtering the rows in a DataView
object. If the filter is set to an inexistent value , that is, after
filtering i have 0 rows in the DataView, and I try to re-show all the rows
again by setting rowFilter = "", after setting the rowStateFilter i obtain
the "Index was outside the bounds of the array",.
If the dataview is not empty this code works fine. Here is the code:
currentView.RowFilter = stringFilter;
currentView.RowStateFilter = System.Data.DataViewRowState.CurrentRows;
if (currentView.Count == 0)
{
currentView.RowFilter = "";
}
Application.DoEvents();