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

Forums / General Discussions / Dropdown LanguageBar in admin.master page

Dropdown LanguageBar in admin.master page

2 posts, 1 answered
  1. Josh
    Josh  avatar
    25 posts
    Registered:
    28 Apr 2009
    15 Oct 2010
    Link to this post
    Hi I am trying to capture the event handler when the language is changed in the dropdownlist to the right of the admin.master page.  It seems that everytime I select a new language it ignores my OnSelectedIndexChanged declaration.  I tried setting it on the LanguageBar control as well at OnLanguageChanged but it still is not captured on my admin.master page.  Is there any way that I can capture this event?

    Kind Regards,

    Josh
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    25 Nov 2016
    15 Oct 2010
    Link to this post
    Hello Josh ,

    You can use JavaScript to catch index changes event

    <telerik:RadScriptBlock runat="server" ID="scriptBlock">
          <script type="text/javascript">
              LanguageBar.prototype.Change = function(e) {
                  var opt = this.List.options[this.List.selectedIndex];
                  alert(opt);
                  this.Submit(opt.value);
              }
          </script>
          </telerik:RadScriptBlock>

    The OnLanguageChanged is called only when RaisePostBackEvent and there is an argument supplied as parameter.

    Regards,
    Ivan Dimitrov
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
    Answered
2 posts, 1 answered