Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
89 views
Hello,

According to this demo:
http://demos.telerik.com/aspnet-ajax/gantt/examples/accessibility-and-internationalization/localization/defaultcs.aspx

How can I localize the date column headers? It still shows...MON,TUE...

Thanks,
Koen
Bozhidar
Telerik team
 answered on 26 Sep 2014
5 answers
94 views
The following error bubbles up when I click the "more..." link on the month view of the RadScheduler.

The DateTime represented by the string is not supported in calendar System.Globalization.GregorianCalendar

Where in the code do I need to look to fix the format?
Bozhidar
Telerik team
 answered on 26 Sep 2014
3 answers
114 views
In our application, we have to meet several requirements that require us to focus the cursor on the first field of the edit item. We are able to achieve this in a few different ways. Either grabbing the edit item on the ItemDataBound event, or even through the use of javascript that you're team has provided on your  site. Although this gives the field focus, it's almost as if it's not true focus. We also have these fields with the properties of 'EnableLoadOnDemand=true' and 'AutoPostback=true' trying to achieve that whenever the customer types in even one letter, the program should mark the first match in the data-bound control. When we focus it, and start typing, nothing happens at all outside of the text being displayed, but if we focus away and then CLICK back to the input area, it sense the text input correctly. We need the field to sense the input and cause the drop-down to load right after clicking insert and gaining focus. We are using the ASP.NET AJAX version 2014.2.618.40 and this has been plaguing our site for a while now.

Please assist!

Thanks,

Joe
Nencho
Telerik team
 answered on 26 Sep 2014
3 answers
241 views
Hello,

I am working on a project with a RadGrid.

When the user clicks on a button, a JavaScript function shows the RadAjaxLoadingPanel.

The surface becomes gray, but I don’t see the loading-Img.

It’s seems it located off-screen. [See Video]

Code:
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function loadajax() {
                var loadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
                var grid = $find("<%= RadGrid1.ClientID%>").get_masterTableView();
                loadingPanel.show(grid.get_id());
            }
 
        </script>
    </telerik:RadCodeBlock>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
<div>
<telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClientClicking="loadajax">
    </telerik:RadButton><br />
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Skin="Default" >
         
    </telerik:RadAjaxLoadingPanel>
    <telerik:RadGrid ID="RadGrid1" runat="server">
    </telerik:RadGrid>
 
</div>

How do I control the position of the rotating loading-Img?

Thanks,
Daniel.
Pavlina
Telerik team
 answered on 26 Sep 2014
1 answer
84 views
Use the following code to Insert/Update/Select our RadGrid, however what I need to display on successful completion of Insert/Update is a message indicating that.  How do I update _lblErrorMessage?  Thanks

<asp:Label ID="_lblErrorMsg" runat="server" Text="" CssClass="alert"></asp:Label>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:FMS_Conn %>"
               SelectCommand="sp_getTopCreditUnions" SelectCommandType="StoredProcedure"
               DeleteCommand="sp_DelTopCreditUnion" DeleteCommandType="StoredProcedure"
               InsertCommand="sp_InsTopCreditUnion" InsertCommandType="StoredProcedure">
            <DeleteParameters>
                <asp:Parameter Name="asi_num" Type="Int32" ></asp:Parameter>
                <asp:SessionParameter Name="user_id" SessionField="user_id" Type="String" />
            </DeleteParameters>
              <InsertParameters>
                  <asp:Parameter Name="asi_num" Type="Int32" ></asp:Parameter>
                  <asp:SessionParameter Name="user_id" SessionField="user_id" Type="String" />
              </InsertParameters>
          </asp:SqlDataSource>
          <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:FMS_Conn %>"
               SelectCommand="sp_getASI_CreditUnions" SelectCommandType="StoredProcedure">
          </asp:SqlDataSource>
Radoslav
Telerik team
 answered on 26 Sep 2014
2 answers
109 views
I was wondering it is possible to keep all tabs on one row and not make them go on the second line, like so:

Tab 1 | Tab 2 | Tab 3 | ... | < > 

The two arrows at the end of the only line would be needed to scroll through tabs that do not fit on the view.

Bye
Nencho
Telerik team
 answered on 26 Sep 2014
6 answers
475 views
Hello,

I come across a problem, which may be just silly, but I can not find the reason. I would appreciate to help me.


I created a WebUserControl containing three RadEditor, each for a different type of text (short text, medium text and large text). Through Javascript I check the maximum number of characters for the short and medium text (this works well):

<script type="text/javascript">
    var maxTextLength = 100;
    var maxTextLengthM = 250;
    var messageText = 'Ha superado el máximo permitido de ' + maxTextLength + ' caracteres para el Texto Corto!';
    var messageTextM = 'Ha superado el máximo permitido de ' + maxTextLengthM + ' caracteres para el Texto Medio!';
 
    function isAlphaNumericKey(keyCode) {
        if ((keyCode > 47 && keyCode < 58) || (keyCode > 64 && keyCode < 91)) {
            return true;
        }
        return false;
    }
 
    function LimitCharacters(editor) {
        editor.attachEventHandler("keydown", function (e) {
            e = (e == null) ? window.event : e;
            if (isAlphaNumericKey(e.keyCode)) {
                textLength = editor.get_text().length;
                if (textLength >= maxTextLength) {
                    alert(messageText);
                    e.returnValue = false;
                    return false;
                }
            }
        });
    }
 
    function LimitCharactersM(editor) {
        editor.attachEventHandler("keydown", function (e) {
            e = (e == null) ? window.event : e;
            if (isAlphaNumericKey(e.keyCode)) {
                textLength = editor.get_text().length;
                if (textLength >= maxTextLengthM) {
                    alert(messageTextM);
                    e.returnValue = false;
                    return false;
                }
            }
        });
    }
 
    function CalculateLength(editor, value) {
        var textLength = editor.get_text().length;
        var clipboardLength = value.length;
        textLength += clipboardLength;
        return textLength;
    }
 
    function OnClientPasteHtml(editor, args) {
        var commandName = args.get_commandName();
        var value = args.get_value();
        if (commandName == "PasteFromWord"
            || commandName == "PasteFromWordNoFontsNoSizes"
            || commandName == "PastePlainText"
            || commandName == "PasteAsHtml"
            || commandName == "Paste") {
            var textLength = CalculateLength(editor, value);
            if (textLength >= maxTextLength) {
                alert(messageText);
                args.set_cancel(true);
            }
        }
    }
 
    function OnClientPasteHtmlM(editor, args) {
        var commandName = args.get_commandName();
        var value = args.get_value();
        if (commandName == "PasteFromWord"
            || commandName == "PasteFromWordNoFontsNoSizes"
            || commandName == "PastePlainText"
            || commandName == "PasteAsHtml"
            || commandName == "Paste") {
            var textLength = CalculateLength(editor, value);
            if (textLength >= maxTextLengthM) {
                alert(messageTextM);
                args.set_cancel(true);
            }
        }
    }
</script>
 
 
 
 
<table style="width:500px; border:none;">
    <tr>
        <td style="text-align:center; font-weight:bold; text-align:center;">Texto Corto
        </td>
    </tr>
    <tr>
        <td style="vertical-align:top;">
                    <telerik:RadEditor Language="es-ES" LocalizationPath="~/App_GlobalResources/" id="txtTextoCorto" runat="server" SkinID="DefaultSetOfTools" EditModes="Design"
                        Skin="Sunset" ToolsFile="~/EditorOpcionesBasicas.xml" OnClientLoad="LimitCharacters" OnClientPasteHtml="OnClientPasteHtml" Height="120">
                    </telerik:RadEditor>
        </td>
    </tr>
    <tr><td style="height:30px;"></td></tr>
    <tr>
        <td style="text-align:center; font-weight:bold; text-align:center;">Texto Medio</td>
    </tr>
    <tr>
        <td style="vertical-align:top;">
 
                    <telerik:RadEditor Language="es-ES" LocalizationPath="~/App_GlobalResources/" id="txtTextoMedio" runat="server" SkinID="DefaultSetOfTools" EditModes="Design"
                        Skin="Sunset" ToolsFile="~/EditorOpcionesBasicas.xml" OnClientLoad="LimitCharactersM" OnClientPasteHtml="OnClientPasteHtmlM" Height="190">
                    </telerik:RadEditor>
 
        </td>
    </tr>
    <tr><td style="height:30px;"></td></tr>
    <tr>
        <td style="text-align:center; font-weight:bold; text-align:center;">Texto Largo</td>
    </tr>
    <tr>
        <td style="vertical-align:top;">
            <telerik:RadEditor Language="es-ES" LocalizationPath="~/App_GlobalResources/" id="txtTextoLargo" runat="server" SkinID="DefaultSetOfTools" EditModes="Design"
                Skin="Sunset" ToolsFile="~/EditorOpcionesBasicas.xml" Height="300">
            </telerik:RadEditor>
        </td>
    </tr>
</table>

This WebUserControl contains a function that saves the text to a database:

public bool GuardarTextos(string pIdACP, out string pError)
        {
            pError = "";
            return mLN.GuardarTextosACP(pIdACP, txtTextoCorto.Content.Trim(), txtTextoMedio.Content.Trim(), txtTextoLargo.Content.Trim(), out pError);
        }

Here, for all the RadEditors (txtTextoCorto, txtTextoMedio and txtTextoLargo) always the Content property and Text property is empty.

I show the WebUserControl in an asp ModalPopupExtender and I call the GuardarTextos function from an external button.

Can you help me what I'm doing wrong?

Thank you very much.
Marin Bratanov
Telerik team
 answered on 26 Sep 2014
1 answer
97 views
Error: Unable to get value of the property 'parentNode': object is null or undefined
Konstantin Dikov
Telerik team
 answered on 26 Sep 2014
1 answer
95 views
i am getting an error as microsoft jscript runtime error object doesn't support this property or method datepicker on postback.

Konstantin Dikov
Telerik team
 answered on 26 Sep 2014
3 answers
109 views
Hi,

There is a nasty bug in the RadGrid control leading to Update/Insert events not firing when editing.

See below how you reproduce the problem and how you resolve it.

We did this with the December 15 version of Telerik.

a) Define a skin such as:

<telerik:RadGrid SkinID = "MySkin" AllowPaging="True" PageSize="30" runat="server" AutoGenerateColumns="false">
</telerik:RadGrid>

b) Create a RadGrid with that skin and add events for update/insert commands

<telerik:RadGrid ID="RadGrid1" EnableViewState="true"
runat="server" SkinID="MySkin"
OnNeedDataSource="RadGrid1_NeedDataSource"
OnUpdateCommand="RadGrid1_UpdateCommand"
AutoGenerateColumns="False" AllowAutomaticDeletes="false" AllowAutomaticInserts="false" AllowAutomaticUpdates="false"
>

c) Events are not firing!

The solution is this:
Simply add the property to the RadGrid: PageSize = "30" and it works again and the events fire. As soon as you put this PageSize property in the skin definition you get into troubled water...

We spent half a day to track this down. God!
Konstantin Dikov
Telerik team
 answered on 26 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?