Reputation: 18973
One of the interviewer had asked me the ways to filter dataview.
I replied as;
(A) Dataview
(B) RowFilter
(C) Select
Is there any other way apart from mentioned above?
Upvotes: 1
Views: 167
Reputation: 74909
Besides those options you can also use LINQ-to-DataSets to filter data in memory.
Additionally, a superior answer in an interview would ask whether or not filtering a DataSet is the best approach in a given situation. Sometimes it is best to cache data and then filter in memory and sometimes it's better to just add the filters onto the original SQL call and have the database filter. Neither option is correct in all situations--it's case by case.
In my opinion a good interview question and answer is more of a discussion of options and pros and cons as opposed to just knowing the answer to some random question.
Upvotes: 2