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

How can I show the busy indicator when loading map data.. what's wrong with this?

1 Answer 105 Views
BusyIndicator
This is a migrated thread and some comments may be shown as answers.
Jon
Top achievements
Rank 1
Jon asked on 30 Jun 2011, 03:01 PM
Hi..
Can you tell me what is wrong with this.. and how I can show the busy indicator when loading map data.. thanks

 

 

private void LoadData()

 

{

 

 

this.radBusy.IsBusy = true;

 

 

 


DataCRMDataContext
dc = new DataCRMDataContext();

 

 

 


var
query = from i in dc.VACTIVEREPs

 

 

 

where i.RepID > 0

 

 

 

select i;

 

 

 

List<CRM_GIS.VACTIVEREP> lstVActiveReps = query.ToList();

 

 

 

 

foreach (VACTIVEREP Rep in lstVActiveReps)

 

{

 

 

var pushpin = new Pushpin();

 

pushpin.Background = System.Windows.Media.

 

Brushes.Red;

 

pushpin.ToolTip = Rep.LastName +

 

", " + Rep.FirstName + " " + Rep.RepNo;

 

 

 

 

MapLayer.SetLocation(pushpin, new Location(Convert.ToDouble(Rep.lat), Convert.ToDouble(Rep.lng)));

 

pushpin.MouseDoubleClick +=

 

new MouseButtonEventHandler(pushpin_MouseDoubleClick);

 

pushpin.MouseDown +=

 

new MouseButtonEventHandler(pushpin_MouseDown);

 

 

 

 

this.informationLayer.Items.Add(pushpin);

 

}

 

 

this.radBusy.IsBusy = false;

 

}

1 Answer, 1 is accepted

Sort by
0
Konstantina
Telerik team
answered on 06 Jul 2011, 03:41 PM
Hi Jon,

In order to make it work you will have to use the BackgroundWorker class as illustrated in this online demo.

Hope this helps.

Regards,
Konstantina
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
BusyIndicator
Asked by
Jon
Top achievements
Rank 1
Answers by
Konstantina
Telerik team
Share this question
or