Event

3 posts, 0 answers
  1. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 22 Jun 2012 Link to this post

    Dear Telerik-Support,

    I use a RadButton and the Event OnClientClicking with the parameter sender, args.

    I need the dom Event in this method. I try it with the global event reference and it only works for IE because Firefox etc. are not implement this global event reference. So I try it with an anoynomous function

    Button property
    OnClientClicking = function(sender, args) {  FnButton_ClientClicking(sender, args, event) };
     
    JavaScript
    function FnButton_ClientClicking(sender, args, e)
    {
    }

    but in the function e will be undefined on firefox.

    Whats wrong here? How can I parse the dom event to the function. If I try the same with an ImageButton and the OnClientClick Event the Browesers parse by using (this, event) all what I need!

    Thanks for help,

    Kind regards,
    Christian
  2. Christian Pardun
    Christian Pardun avatar
    112 posts
    Member since:
    May 2010

    Posted 26 Jun 2012 Link to this post

    Any idea on this issue?
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Slav
    Admin
    Slav avatar
    1355 posts

    Posted 26 Jun 2012 Link to this post

    Hello Christian,

    Currently the RadButton control does not provide an access to its click DOM event object. This is a good suggestion and it will be brought to the attention of our developers for future implementation. Here you can track the status of the feature request in PITS.

    For the time being you can use the following workaround to get the DOM event, which is contained in the variable domEvent:
    <script type="text/javascript">
        var domEvent = null;
        Telerik.Web.UI.RadButton.prototype._mouseClickHandlerOld = Telerik.Web.UI.RadButton.prototype._mouseClickHandler;
        Telerik.Web.UI.RadButton.prototype._mouseClickHandler = function (args) {
     
            domEvent = args.rawEvent;
     
            this._mouseClickHandlerOld(args);
        }
    </script>

    I have updated your telerik points accordingly as a token of gratitude for your suggestion.

    Regards,
    Slav
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top