1 Reply Latest reply on May 5, 2006 9:19 PM by TIPLVinay

    Filtering dataGrid results

      I have spent the day in the help files, trying to understand how I can filter a dataset. I have a dataGrid whose dataProvider is bound to an HTTPService that (for now) retrieves a dataset from an XML file. Through some other controls, I'd like to filter the display of that data in the dataGrid by column values that meet certain criteria. I'm having quite a time trying to figure out how to do that. Seems like it should be simple, as I would imagine it would be a rather common thing to do.

      Say my dataset contains a list of names of people, and I have a control that allows me to select the first letter (or first few letters) of the last name, so that only those names that begin with that letter (or letters) appears in the grid. Since I have the complete dataset in memory, I don't want to send repeated requests to get filtered datasets - I want to do the filtering right there, and have it respond to what the user types in.

      Is there some way to wrap the results of the HTTPService request into an ICollectionView wrapper and use that as the data provider to the dataGrid so that I can assign a filter function to the data provider and have the effects of the filter parameters be reflected in the dataGrid view?