Marshall Harrison [mailto:[EMAIL PROTECTED]] wrote:
> I'm already using a DataView and I've looked at the Filter > method but that only seems to allow me to filter on existing columns. > > I need to take the lat/lon of an origin and a destination > then calculate the mileage between them. After performing the > calculation I need to do one of two things: > > 1. if it is in the chosen radius then add a miles column to > the dataset/datview and put the record into the grid > > 2. In it outside the radisu then discard the record from the grid. This shouldn't be too complicated using a custom DataColumn with an Expression that contains your algorithm, but it depends on how complex the algorithm it. If the algorithm can be expressed using the DataColumn::Expression rules[1] then once you get the dataset back from the datasource, append a custom DataColumn to the table which calculates its value based off the other two columns in the row. Then you can filter the DataView by this custom column. HTH, Drew [1] ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemdatadatacolumnclassexpress iontopic.htm You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.