Select to view content in your preferred language

List Event Handling?

1201
2
09-01-2011 01:46 PM
DanielDillard
Emerging Contributor
I would like to be able to have my web part listen for when an item is added to a spatially enabled list, then do something with the coordinates of the list.  Any suggestions?
0 Kudos
2 Replies
DanielDillard
Emerging Contributor
Figured it out (sort of).  Build a Silverlight Application as explained here.  Add a class with commands and/or behaviors for your Map web part.  You can create an object from MainPage and use any members of it in this class, as far as I can tell.

This will get you Context.Web which allows you get get list objects by name.  I haven't figured out how to wire up an item-added event handler, but I have used this method to add list items programmatically through the web part.  (Don't forget to upload your extension to the Map web part and add any commands/behaviors!)
0 Kudos
DanielDillard
Emerging Contributor
Okay, so I guess you can't wire the event handler in the Silverlight application, as you need to use Microsoft.Sharepoint libraries which you cannot do in a Silverlight application.  Oh, well...
0 Kudos