+1-888-365-2779
Try Now
More in this section

Forums / Sitefinity SDK / Konw when a widget is dropped in page

Konw when a widget is dropped in page

2 posts, 0 answered
  1. Paulo
    Paulo avatar
    19 posts
    Registered:
    03 Nov 2010
    03 Dec 2010
    Link to this post
    Hi

    I would like to know if it's possible to konw when a widget is dropped into a page. is there any event that we can capture to acomplish this?

    The objectif is to set a custom property value once it is added to the page.

    thanks in advance
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    09 Dec 2016
    03 Dec 2010
    Link to this post
    Hi Paulo,

    There is no server side event that fired when you drop a control on a page. You can do this only on the client by getting an instance of ZoneEditor

    <script type="text/javascript">
     
    function test()
    {
        alert('test');
    }
    function pageLoad() {
        alert('load');
        var c = $find('ZoneEditor');
        c.add_command(test);
    }
    </script>


    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Check out Telerik Trainer, the state of the art learning tool for Telerik products.
2 posts, 0 answered