We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Row filter based on external value


I have a grid that shows a list of places each of which has a Latitude and a Longitude value.
Then I have a 2 textboxws in which I can type a City and a Distance in Km.

Is it possible to filter the grid rows to show only the places which have a distance less than the value in Km from the City I have typed?

Can I use client filtering or must I reload the filtered data from server?

Thanks a lot.


1 Reply

SA Saravanan Arunachalam Syncfusion Team January 6, 2017 06:34 AM UTC

Hi Claudio, 
Thanks for contacting Syncfusion’s support. 
The Grid control is mainly used for display the content as table and your requirement is separate from the Grid control which means it is not inbuilt behavior of Grid control. So, we suggest that you need to write an algorithm which should be independent of Grid control and the algorithm defines to filter the data based on the textboxes values. i.e If we enter the city name and the distance as 10Km then click the button to filter, calculate the distance (in Km) from selected place (latitude,longitude) to all other places in datasource which is lessthan the 10km.  Then you can bind that the filtered data to the Grid by using “dataSource” method of Grid control. Please refer to the below online documentation link and stackoverflow link. 
Saravanan A. 

Live Chat Icon For mobile
Up arrow icon