This is a migrated thread and some comments may be shown as answers.

RadGrid blocking Google Places Autocomplete AJAX

2 Answers 80 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Tio
Top achievements
Rank 1
Tio asked on 06 Apr 2014, 09:34 AM
I'm working on a web control that updates contact information, and I call that web control via the RadGrid  .... the way I have it set up is, the RadGrid shows a list of the contacts, and then I click Edit in the RadGrid, to link to the contact update web control as part of the EditFormSettings.

The problem I'm having, is when I add the code to  that uses Google Places Autocomplete to do the address validation.

The code I'm embedding for the address validation is as per the example at this page: https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

The problem is, that the Autocomplete WILL NOT WORK, when the control is called from inside the RadGrid for the Edit event.

Yet, when I move the control to anywhere else, it works just fine.

Seems like the extra event handlers that are bound to my Address Search box by Telerik, are somehow interfering with the AJAX for the Google Autocomplete?  That is only a guess.

Any advice much appreciated, thanks in advance!!!

2 Answers, 1 is accepted

Sort by
0
Tio
Top achievements
Rank 1
answered on 08 Apr 2014, 09:11 AM
Hi, update to my post, as mentioned the code I've embedded in my user control, is exactly as per the example here:  https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform

the part that is not working properly, is the part that sets up the listener for the autocomplete control, as per this snippet:

  // When the user selects an address from the dropdown,
  // populate the address fields in the form.
  google.maps.event.addListener(autocomplete, 'place_changed', function() {
    fillInAddress();
  });




0
rdmptn
Top achievements
Rank 1
answered on 09 Apr 2014, 04:02 PM
probably some IDs change because the edit form is an INaming container. Go through your object references and see if they are correct.
Try moving the edit form in a separate page and call that in a RadWindow: http://www.telerik.com/forums/radgrid-blocking-google-places-autocomplete-ajax. Thus it will be in a simple iframe and if the maps work in an iframe you will be set (and your main page will be simpler).
Tags
Grid
Asked by
Tio
Top achievements
Rank 1
Answers by
Tio
Top achievements
Rank 1
rdmptn
Top achievements
Rank 1
Share this question
or