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.
Unfortunately, activation email could not send to your email. Please try again.

Row filter based on external value

Thread ID:

Created:

Updated:

Platform:

Replies:

128156 Jan 5,2017 09:20 AM Jan 6,2017 01:34 AM ASP.NET MVC 1
loading
Tags: Grid
CLAUDIO RICCARDI
Asked On January 5, 2017 09:20 AM

Hello,

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.

Claudio

Saravanan Arunachalam [Syncfusion]
Replied On January 6, 2017 01:34 AM

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. 
Regards, 
Saravanan A. 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;