Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
473 views

In the Q3 2015 SP1 release the server-side OnClick event of RadButton is not raised when the following conditions are met:

  • The RenderMode of the button is set to Lightweight.
  • The .aspx page is opened under Chrome or Edge browser.
  • The button triggers an AJAX request.
  • The text of the button is clicked.

The issue will be fixed for the official Q1 2016 release and the 2015.3.1124 internal build.

For the time being you can use one of the following resolutions:

  • Set the UseSubmitBehavior property of the button to false
    <telerik:RadButton ID="RadButton1" runat="server" UseSubmitBehavior="false" Text="Click" OnClick="RadButton1_Click" RenderMode="Lightweight" />
  • OR place the following JavaScript workaround below the button's declaration (e.g., at the end of the page/master page):

    <script>
        var $T = Telerik.Web.UI;
        $T.RadButton.prototype._mouseClickHandler = function (args) {
            var button = this, result;
            var target = args.target;
            var e = args.rawEvent;
            var element = button.get_element();
      
            if (target !== element && $telerik.isDescendant(element, target)) {
                $telerik.cancelRawEvent(e);
                simulateMouseEvent(element, "click", e);
                return;
            }
      
            try {
                if (button._functionality.clicking(args) && !element.getAttribute("rwOpener")) {
                    button._functionality.click(args);
                    result = button._functionality.clicked(args);
                }
            }
            finally {
                button._mouseUp(args);
                button._restoreFlags();
                setTimeout(function () { Page_BlockSubmit = false; }, 0);
                return !result ? $telerik.cancelRawEvent(e) : true;
            }
        };
      
        function simulateMouseEvent(element, eventName, args) {
            var o = $telerik.$.extend({}, args || {});
            var oEvent;
      
            if (document.createEvent) {//deprecated DOM2 Event Model
                oEvent = document.createEvent("MouseEvents");
                oEvent.initMouseEvent(eventName, o.bubbles, o.cancelable, document.defaultView,
                                      o.button, o.screenX, o.screenY, o.clientX, o.clientY,
                                      o.ctrlKey, o.altKey, o.shiftKey, o.metaKey, o.button, element);
            }
            else if ("MouseEvent" in window) {//standard DOM3 Event Mode
                oEvent = new MouseEvent('click', o);
            }
            oEvent && element.dispatchEvent(oEvent);
      
            if (!oEvent) {//IE
                oEvent = extend(document.createEventObject(), o);
                element.fireEvent('on' + eventName, oEvent);
            }
      
            return element;
        }
      
        function extend(destination, source) {
            for (var property in source) {
                destination[property] = source[property];
            }
            return destination;
        }
    </script>

 

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 24 Nov 2015
3 answers
106 views
We have a paged grid that loads the results of a stored procedure that returns over 100,000 results. We're experiencing some performance delays. Is there a way to have the grid only return the required results for the page it is on? We understand that we will need to modify the stored procedure also but aren't clear how to get the grid itself to make the right call for the particular page.
Pavlina
Telerik team
 answered on 24 Nov 2015
4 answers
170 views

I want to freeze the column header, so that i set UseStaticHeaders=True.

But i found that the Group Header had alignment problem (please see attached screen capture).

Please help. Thanks

Pavlina
Telerik team
 answered on 24 Nov 2015
1 answer
119 views

I have a RadComboBox that is loading items on demand from a Page method. About 1% of the time, it would lose the selected value on post back. After much digging, I found that in all of those1% cases, there was a \r and/or \n character in the data stringbeing used for the item's text. Once I filtered out the \r and \n characters everything works fine.

I thought I would post this in case anyone else has a similar problem.

I would also urge Telerik to either fix this issue or to put something very clear in the documentation about this.

Nencho
Telerik team
 answered on 24 Nov 2015
4 answers
184 views

We are currently using version 2015.2.826 of Telerik controls.  We are getting intermittent exceptions from one of our pages where we have codebehind for handling the grid events.  The error we are getting is:

Unable to cast object of type 'System.EventArgs' to type 'Telerik.Web.UI.GridPageChangedEventArgs'

We have searched for any other customers with this problem, but are not able to find anything.  We definitely need your help on this production problem.

Thank you,

Ed Sudit

Edward Sudit
Top achievements
Rank 1
 answered on 24 Nov 2015
2 answers
148 views
I have a RadMaskedTextBox to accept a Social Security Number.  What I would like to do is display the field content when the field is in focus, but then change to textmode=password when not in focus.  Is this possible using javascript or another method?  Thanks.
Adam
Top achievements
Rank 1
 answered on 24 Nov 2015
5 answers
125 views

Hi Telerik Team,

We are trying to create stand-along document, image, flash and media managers without Editor. We use RadDialogOpener to open different dialogs. It works great except we try to get select item value. We using "ClientCallbackFunction", in that function, the "args.get_value()" return an object. Can we have a method to return a html string so we can easily to display?

 script below:

function CallbackFunction( sender, args )

{

    

}

 Thanks,

Lan

lan luo
Top achievements
Rank 1
Iron
 answered on 24 Nov 2015
1 answer
208 views

Hello,

we have a problem with using different Assembly Versions of the Telerik.Web.Ui.dll that are deployed in the Global Assembly Cache.

We are getting the following reproducable error: 

Telerik.Web.UI.RadFormDecorator with ID='RadFormDecorator1' was unable to find an embedded skin with the name 'Metro'. Please, make sure that the skin name is spelled correctly and that you have added a reference to the Telerik.Web.UI.Skins.dll assembly in your project. If you want to use a custom skin, set EnableEmbeddedSkins=false.

The used versions are i.e: 2013.2.611.45 and 2015.1.225.45.

  • Scenario1: The first page that will be opened finds the Theme correctly. If we navigate to the second page, where the other Version of the Telerik dll is used, then the error with the Theme is thrown.
  • Scenario 2: If we navigate at first to the second Page (of course after a webapplication recycle), then this page works correctly and the first page throws the error.
  • Scenario 3: If the two pages are using the same Version of the Telerik.Web.Ui.DLL then no error will be thrown

Do you know this behaviour and know how i can get this work?

Thanks,

Bastian John

Marin Bratanov
Telerik team
 answered on 24 Nov 2015
4 answers
71 views

I am trying to have a custom dropdown on the editor but for some reason it is working but its also making my nonjustify tool active upppon using it here is my code

 

01.                   <telerik:RadEditor ID="txtMessage"  ToolsFile="~/BackDoor/ToolsFile.xml" runat="server" Skin="Bootstrap"  OnClientCommandExecuting="OnClientCommandExecuting" RenderMode="Auto">
02.                    <Tools>
03.    <telerik:EditorToolGroup>   
04.        <telerik:EditorSplitButton Name="TagList"  Text="Sets Dynamic Tags In Emails"   ImageUrl="~/assets/img/tags.png"  ImageUrlLarge="~/assets/img/tags.png" ItemsPerRow="5" PopupWidth="170px" PopupHeight="117px" RenderMode="Auto">
05.          <telerik:EditorDropDownItem  Name ="{Player_ID}" value="{player_Id}"/>
06.        <telerik:EditorDropDownItem  Name ="{Player_name}" value="{player_name}"/>   
07.        <telerik:EditorDropDownItem  Name ="{Player_IpAddress}" value="{player_IpAddress}"/>   
08.             <telerik:EditorDropDownItem  Name ="{Player_Points}" value="{player_points}"/>   
09.            <telerik:EditorDropDownItem  Name ="{Player_Points}" value="{player_prize}"/>   
10.        </telerik:EditorSplitButton>
11.    </telerik:EditorToolGroup>
12.</Tools> 
13.                     
14. 
15.                    </telerik:RadEditor>

And here is what i use in the client side event

 

01.   <script type="text/javascript">
02.        function OnClientCommandExecuting(editor, args) {
03.            var name = args.get_name(); //The command name
04.            var val = args.get_value(); //The tool that initiated the command
05.            if (name == "TagList") {
06.                editor.pasteHtml("" + val + "");
07.                //Cancel the further execution of the command as such a command does not exist in the editor command list
08.                args.set_cancel(true);
09.            }
10.        }
11.</script>
12.      
13. 
14.     
15.<style type="text/css">
16.    span .reTagList
17.    {
18.        background-image:url(/assets/img/label49.png);
19.       background-repeat: no-repeat;                                                         
20.    }   
21.         
22.</style>

 

Also I cannot get my icon to appear any ideas guys as what going on im using 30 day demo just

Vessy
Telerik team
 answered on 24 Nov 2015
1 answer
278 views

I have a RadWindow that contains a User Control. This user control is doing a lot of processing on load. The initial state of the RadWindow is minimized.

 

I want the RadWindow to NOT load the UserControl inside it when the page is initially opened. I want the user control to be loaded only when I open the RadWindow.

Marin Bratanov
Telerik team
 answered on 24 Nov 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Top users last month
Miljana
Top achievements
Rank 2
Iron
Iron
Joel
Top achievements
Rank 3
Bronze
Bronze
Bronze
Cynthia
Top achievements
Rank 1
John
Top achievements
Rank 1
Iron
Mozart
Top achievements
Rank 1
Iron
Veteran
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?