|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
How to detect hidden rows?Hi there,
Is there a way to know if a DataRow is hidden by an active DefaultView.Filter of its DataTable? In other words, is there any way to know if a specific DataRow will be iterated too ("visible") when iterating the DataRowView collection of the filtered DataView? Regards, -Benton Hi Benton:
"Benton" <no@spam.com> wrote in message --If I understand your question correctly, the answer is 'no'. You see, news:eTQ1OmtFGHA.1088@tk2msftngp13.phx.gbl... > Hi there, > > Is there a way to know if a DataRow is hidden by an active > DefaultView.Filter of its DataTable? In other words, is there any way to > know if a specific DataRow will be iterated too ("visible") when iterating > the DataRowView collection of the filtered DataView? when you use a Rowfitler, a new DataView object is created and rows that don't meet the filter condition are simply excluded from the view. It's not the most efficient thing to do but you can create a second view based on the inverse of your filter criteria - this would give you all of the rows that were filtered out in your first pass. Show quote > Regards, > > -Benton > > It's not the most efficient thing to do but you can create a second view Why not efficient. Efficient is the best method that fits the goal, in my > based on the inverse of your filter criteria - this would give you all of > the rows that were filtered out in your first pass. case do you describe that well. (You mean probably not forever the most easiest way if the rowfilter is complex) I think that there are other methods however those are in my opinion less efficient. One of those is looping through the datatable and use the dataview.find than if it exist in the dataview. :-) Cor |
|||||||||||||||||||||||