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

[Solved] Google Map in RadGrid

4 Answers 246 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Soren Michelsen
Top achievements
Rank 1
Soren Michelsen asked on 07 Oct 2009, 08:32 AM
I have a radgrid bound to a database containing geographical data:
Location (ex. "London")
Latitude
Longitude

The grid displays the Location field, and in a NestedViewTemplate, I display a Google Map with a marker set at the latitude/longitude coordinate.

To only allow one item to be expanded at a time, I have enabled "Single Expand" according to this article:
http://www.telerik.com/help/aspnet-ajax/grdsingleexpandinhierarchicalgrid.html

What I'd like:

1. To be able to collapse the single expanded item. Right now I can't do that. Here is my current ItemCommand eventhandler:

If e.CommandName = "ExpandCollapse" Then 
    For Each item As GridItem In e.Item.OwnerTableView.Items 
        If item.Expanded = True Then 
            item.Expanded = False 
        End If 
    Next 
End If 


2. To ajaxify the grid to prevent full-page refreshes when I expand a new item. Right now it fires an "access is denied" error if I try to ajaxify using a radAjaxManager.

A simple project that replicates my problem can be downloaded from http://www.stmtest.net/GoogleMapsGrid.zip

Note: Telerik dll's are not included in the /bin folder in .zip

Any ideas appreciated,
Jeppe Jespersen
Denmark



4 Answers, 1 is accepted

Sort by
0
Pavlina
Telerik team
answered on 12 Oct 2009, 12:22 PM
Hi Jeppe,

I suggest you review this code library which demonstrates how to expand/collapse hierarchical grid with ajax request on row double-click (without page refresh). Feel free to modify the code logic to be executed on single click.

Sincerely yours,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Soren Michelsen
Top achievements
Rank 1
answered on 12 Oct 2009, 05:22 PM
Hmmm... the last four bullet-points in the addition to the original post are (for a newbie like me) very, very vague.

Any way anyone can elaborate on those or maybe even provide  a working example with a current version of RadGrid?

Thx :-)
J. Jespersen
Denmark

0
Pavlina
Telerik team
answered on 15 Oct 2009, 03:00 PM
Hello Jeppe,

It seems that you have opened a support ticket for an identical issue. To avoid duplicate posts, we can continue our communication in the support ticket.

Greetings,
Pavlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Soren Michelsen
Top achievements
Rank 1
answered on 15 Oct 2009, 04:25 PM
Yes, very similar issue, but have switched to Bing Maps (Microsoft).

I will post solution here once we get there :-)

-Jeppe

Tags
Grid
Asked by
Soren Michelsen
Top achievements
Rank 1
Answers by
Pavlina
Telerik team
Soren Michelsen
Top achievements
Rank 1
Share this question
or