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

Hi,

I am having following unexpected behavior:

After canceling request when a file is too big, when I am selecting another file, args._progressData.RadUpload.RequestSize is from previous file and not from one which I just selected.


Code:
function CheckUploadedImageFilesSize(progressArea, args)
{
        if(args._progressData.RadUpload.RequestSize > maxSize)
        {
            progressArea.cancelRequest();
        }
}
Iulian
Top achievements
Rank 1
 asked on 17 Jun 2009
1 answer
101 views
Hey Folks. I've setup the Client-side master/detail binding as per Vlad's examples and am having some problems with this particular function:


function RadGrid1_HierarchyExpanding(sender, args) {
    collapseItems(sender);

    try {

        var customerID = args.getDataKeyValue("CustomerID");
        var nestedViewItem = args.get_nestedViewItem();

        nestedViewItem.cells[1].appendChild($get("RadGrid2"));

        ordersView = $find("RadGrid2").get_masterTableView();

        ordersCommandName = "Load";

        WebService.GetOrdersByCustomerID(customerID, ordersView.get_currentPageIndex() * ordersView.get_pageSize(), ordersView.get_pageSize(),
                    ordersView.get_sortExpressions().toString(), ordersView.get_filterExpressions().toDynamicLinq(),
                        updateOrdersGrid);
    }
    catch (Error) {
        alert(Error);
    }
}

Both IE and Firefox complain that cells is undefined. Firefox can see it, so I think the cells is private to the row. How else can I replace the nestedViewItem.cells[] content? I think everything else is working OK.



Sebastian
Telerik team
 answered on 17 Jun 2009
0 answers
384 views
Telerik RadXmlHttpPanel is an UI control that serves as a container for rapid content loading. You can place diverse content on the RadXmlHttpPanel: rich user content, user controls or just about anything that could be added on a page.
There are three ways for loading data on the RadXmlHttpPanel. These are: AJAX, Client Callback and WebService. Each of them has strong or weak points, so which one should be used depends solely on the scenarios the RadXmlHttppanel is used in.

  • AJAX - It is the slowest of the three. This is happening because, when AJAX is used the controls affected are destroyed and recreated on the page, so the state of the controls is saved and posted back from the server, together with the content of the RadXmlHttpPanel. On the other hand the AJAX framework is flexible and universal. It can be used in many different scenarios.
  • Callback - When a client callback is used, only the RadXmlHttpPanel content is retrieved from the server, in contrast when using AJAX. The client state is not affected by the postback, so no need the state of the controls to be restored. Moreover, a handler for the OnServiceRequest event of the RadXmlHttpPanel should be specified to handle the data request which is not the case when using a WebService.
  • WebService - can be used to handle the data request of the RadXmlHttpPanel. The WebMethodPath and the WebMethodName properties should be set and the RadXmlHttpPanel automatically retrieves and loads the data. Similarly as in the Client Callback the client state is not affected.

The WebService and the Callback are maybe faster ways to load content, but their usage is specific and not as flexible as in the case when AJAX is used. 

To get familiar with the control please follow these online resources:

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 17 Jun 2009
2 answers
115 views
I created a class that inherits from FileManagerDialogConfiguration (and ImageManagerDialogConfiguration), which loads the correct configuration for my website (I have written a custom FileSystemBrowser, which takes some substantial configuration). This greatly reduces the amount of repeated code for loading FileExplorer and RadEditor. However, I can't set the RadEditor ImageManager (or FileManager.Configutation) property because it is Read Only. Is there a reason it is read only? Is there any work around for this?
dlamprey
Top achievements
Rank 2
 answered on 17 Jun 2009
0 answers
441 views
Telerik RadCaptcha is UI control that provides two major strategies for protection against automated form submissions:
  • Image With Modified Symbols (Captcha Image) - They are displayed in a form, and the user is required to input the symbols in a textbox. The Image is generated with an HttpHandler.
  • Automatic Robots Discovery - this strategy uses predefined rules which decide whether the input comes from a robot or not. At this point, there are two implemented rules that could be applied either separately or simultaneously.
    • Minimum form submission time - the presumption is that a human cannot input the fields in a form correctly for a time less than 3 seconds (this is set by default, and could be modified). If the submission is executed faster than the predefined value, it is assumed that the executor is a robot.
    • Hidden textbox in the form (the so-called "honeypot") - this rule requires the insertion of a textbox which is not visible when the form is styled. Still, it will be detected by a robot, and therefore if any data is entered, the executor is considered to be a robot.

Key features:
  • Three Modes for Protection - you can easily define which spam protection strategies to be used for spam protection. For maximum security, by default, all of them are used.
  • Set Custom Error Message - the error message that is displayed when the condition being validated fails. Depending on which protection strategy is used, the respective error message is displayed.
  • Background and Line Noise Level of the Captcha Image - you can easily control the background and the line noise of the Image by setting the respective value (None, Low, Medium, High or Extreme). The default level of the background noise is Low and of the line noise is None.
  • Font Family and Font Warp of the Catcha Image - you can easily choose which font family to be used for the Image text. Arial is used as a default value for the font family. Furthermore, the amount of random font warping to apply to the rendered text can be changed by setting the CaptchaFontWarp property. The default amount of font warping is Low.
  • Text Length and Possible Characters of the Catcha Image - the default length of the text is 5 characters, and the characters could be either letters or either numeric characters. Alternatively, you can choose what kind of characters to be used (only letters or only numeric characters), and change the length of the text.
  • Maximum time interval of the Captcha Image - the maximum number of minutes the Captcha Image will be cached and valid.
  • Minimum Timeout - minimum number of seconds the form must be displayed before it is valid. If you're too fast, you must be a robot. This is set when “Minimum form submission time” mode is used for Spam Protection.

To get familiar with the control please follow these online resources:

Telerik Admin
Top achievements
Rank 1
Iron
 asked on 17 Jun 2009
1 answer
65 views
The ToolTip Demo doesn't work after I imported the demo files. I've found out that the problem comes up with strong names:

http://joel.neubeck.net/2007/03/loading-custom-web-control-from-an-aspx-code-behind-page/

This Line don't work, because the given type is not: AppointmentToolTip instead it is ASP.AppointmentToolTip_ascx

AppointmentToolTip

 

toolTip = (AppointmentToolTip)LoadControl("AppointmentToolTip.ascx");

Even to add ClassName or changing the Reference Tag to Register, doesen't work.

 

<%

@ Register src="AppointmentToolTip.ascx" TagName="AppointmentToolTip" TagPrefix="ptc" %>

 

 




Iana Tsolova
Telerik team
 answered on 17 Jun 2009
1 answer
90 views
Hi folks !

Im using the RAD GRID from ASP.NET AJAX UI Controls.

Iam using the GRAY SKIN for the above mentioned GRID.

Actually, I want to display my Rad Grid show like an HORIZONTAL RULER when it containd no data. (i.e. RAD GRID should not display the COULMN HEADERS even if contains no data.)

I dont know you guys are getting me or not. ?

Guys,

I hope you are getting me,

Let me give you an another exapmle :-

I have an ASPX Page that display the RAD GRID(with GRAY SKIN) , this RAD GRID is connected to the OBJECT DATASOURCE. At the first instanace , RAD GRID contains two or three columns (i.e. COLUMN HEADERS).
 
Now here my problem comes , I want these RAD GRID COLUMN HEADERS not to be visible until or unless I hit the SHOW GRID/ANY BUTTON to show the RAD GRID at its fullest with data being displayed.

Or in the simpler words , I want to have my grid look like the HORIZONTAL RULER when it do not have any records to display.
 
If you guys want me to give you  an screen shot, I will surely provide it to you.

Please provide me the much needed help as you giys have done it before .

Thanks & Regards

Ajay 


Veli
Telerik team
 answered on 17 Jun 2009
4 answers
201 views

Hello,

 

We are currently using an AutoCompleteExtender and a RadEditor in our page. Unfortunately, whenever we put in the RadEditor, the AutoCompleteExtender

throws an error everytime the user selects an option within its drop down list (using a single mouse click). When we remove the RadEditor from the page, users are again able

to select an option from the autocompleteextender dropdown list without any errors. When we tried debugging the error we get an 'Unspecified Error'

that can be traced to a certain getClientRects function. Would you have any ideas why the RadEditor appears to cause an error on the

AutoCompleteExtender? Are there any problems that may result from using AjaxToolkit AutoCompleteExtender and your RadEditor?

 

<telerik:RadAjaxPanel runat="server" id="rpnlProfileIntroduction"> 
    <table style="width: 750px" cellpadding="0" cellspacing="0" onmouseover="ShowEditButtonProfileIntroduction(true)" onmouseout="ShowEditButtonProfileIntroduction(false)"> 
        <tr id="trEditProfileIntroduction" runat="server"> 
            <td style="width: 250px;" valign="top"> 
                <table cellspacing="1" cellpadding="0" width="350">        
                    <tr> 
                        <td class="ms-ppPropertyLabel" style="width: 120px"> 
                            Current Client: 
                        </td> 
                        <td valign="top" class="ms-ppRedirectLinks" > 
                            <asp:TextBox ID="txtCurrentClient" runat="server" width="200px"></asp:TextBox> 
                            <ajaxToolkit:AutoCompleteExtender 
                                runat="server" 
                                ID="autoCompleteCurrentClient" 
                                TargetControlID="txtCurrentClient"          
                                ServiceMethod="GetCompletionList" 
                                MinimumPrefixLength="1" 
                                CompletionInterval="1000" 
                                EnableCaching="False" 
                                CompletionSetCount="10" 
                                UseContextKey="True" 
                                ContextKey="CurrentClient" 
                                DelimiterCharacters=" " 
                            /> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td align="left" class="ms-ppErrorTextDescription" colspan="3" valign="top"> 
                            <asp:RegularExpressionValidator ID="regCurrectClient" ControlToValidate = "txtCurrentClient" runat="server" ErrorMessage="Semicolon (;) is not a valid character." ValidationExpression="[^;]*" Display="Dynamic"></asp:RegularExpressionValidator> 
                        </td> 
                    </tr> 
                </table> 
            </td>        
            <td valign="top"> 
                <table cellpadding="0" width="400" style="word-wrap:break-word"> 
                    <tr> 
                        <td style="width:400px; height: 19px;" class="ms-ppPropertyText" id="tdProfessionalBio"> 
                            <telerik:RadEditor ID="radEditProfessionalBio" runat="server" Width="400px" EditModes="Design" Skin="Hay" Height="200px"> 
                                <Tools> 
                                    <telerik:EditorToolGroup> 
                                        <telerik:EditorTool Name="Cut" /> 
                                        <telerik:EditorTool Name="Copy" /> 
                                        <telerik:EditorTool Name="Paste" /> 
                                        <telerik:EditorTool Name="Undo" /> 
                                        <telerik:EditorTool Name="Redo" /> 
                                        <telerik:EditorTool Name="FormatStripper" /> 
                                        <telerik:EditorTool Name="InsertTable" /> 
                                        <telerik:EditorTool Name="ToggleTableBorder" /> 
                                        <telerik:EditorTool Name="LinkManager" /> 
                                        <telerik:EditorTool Name="Unlink" /> 
                                        <telerik:EditorTool Name="InsertSymbol" />  
                                    </telerik:EditorToolGroup> 
                                </Tools> 
                            </telerik:RadEditor> 
                        </td> 
                    </tr> 
                    <tr> 
                        <td align="left" class="ms-ppErrorTextDescription" colspan="3" valign="top">                                                                 
                            <asp:RegularExpressionValidator ID="RegExrProfessionalBio" ControlToValidate = "radEditProfessionalBio" runat="server" ErrorMessage="The bio is too long to fit on My Page.  Please edit your bio." ValidationExpression="[\s\S]{0,3600}" Display="Dynamic"></asp:RegularExpressionValidator> 
                        </td> 
                    </tr> 
                </table> 
            </td> 
        </tr> 
    <table> 
</telerik:radajaxpanel> 

 

Hoping for your immediate response.

 

Thanks.

Arthur

Albert
Top achievements
Rank 1
 answered on 17 Jun 2009
2 answers
179 views
Run this page ...

<html xmlns="http://www.w3.org/1999/xhtml" > 
<head runat="server"> 
    <title></title> 
</head> 
<body> 
    <form id="form1" runat="server"> 
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"> 
    </telerik:RadScriptManager> 
    <div> 
      <telerik:RadTextBox ID="RadTextBox1" runat="server" EmptyMessage="Drag text on to me"> 
      </telerik:RadTextBox><asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> 
      <br /> 
      <telerik:RadTextBox ID="RadTextBox2" runat="server" TextMode="Password" EmptyMessage="Enter Password"> 
      </telerik:RadTextBox><asp:Label ID="Label2" runat="server" Text="Label"></asp:Label> 
      <br /> 
       
      <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click" /> 
    </div> 
    </form> 
</body> 
</html> 
        protected void Button1_Click(object sender, EventArgs e) 
        { 
            Label1.Text = RadTextBox1.Text; 
            Label2.Text = RadTextBox2.Text; 
        } 

First of all, you will see that the password box appears to have a value, although clicking on the button will show that it doesn't.

Drag some text on to the 1st textbox. I dragged the url for this page out of the Location bar of FF on to the textbox on my page. Pressing the button, you would expect to see "http://www.telerik.com/community/forums/new-thread.aspx?forumId=243". What I actually get is "Drag text on to mehttp://www.telerik.com/community/forums/new-thread.aspx?forumId=243 ".

I'm fairly sure you can't do anything about the first of these 2 issues. I suspect the 2nd is a bug you could fix.

--
Stuart




Stuart Hemming
Top achievements
Rank 2
 answered on 17 Jun 2009
4 answers
143 views

Hi,
I need to place two RadCharts on same page and they have to be updated with the same event. When the update gets triggered by RadAjaxManager, the second defined graph in AjaxUpdateControl always flickers. Here is the example code:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GraphFlicker.aspx.cs" Inherits="Application_Test_GraphFlicker" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %>

<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Charting" tagPrefix="telerik" %>

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

 

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

    <script type="text/javascript">

   

      function pageLoad() {

      }

   

    </script>

</head>

<body>

    <form id="form1" runat="server">

   

        <asp:ScriptManager ID="ScriptManager1" runat="server" />

       

            <asp:Button runat="server" ID="btn1" Text="Test" />

           

        <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">

            <AjaxSettings>

                <telerik:AjaxSetting AjaxControlID="btn1">

                    <UpdatedControls>

                        <telerik:AjaxUpdatedControl ControlID="btn1" LoadingPanelID="LoadingPanel" />

                        <telerik:AjaxUpdatedControl ControlID="RadChart1" LoadingPanelID="LoadingPanel" />

                        <telerik:AjaxUpdatedControl ControlID="RadChart2" LoadingPanelID="LoadingPanel" />

                    </UpdatedControls>

                </telerik:AjaxSetting>

            </AjaxSettings>

        </telerik:RadAjaxManager>

        <telerik:RadAjaxLoadingPanel ID="LoadingPanel" runat="server" Skin="Vista" />

           

            <telerik:RadChart ID="RadChart1" runat="server" SkinsOverrideStyles="false" Width="240px" Height="400px" ChartTitle-TextBlock-Text="Chart" ChartTitle-Appearance-Visible="false">

                  <PlotArea Appearance-Dimensions-Margins="0px">

                        <XAxis MaxValue="5" MinValue="1" Step="1">

                        </XAxis>

                        <YAxis MaxValue="25" Step="5">

                        </YAxis>

                        <YAxis2 MaxValue="5" MinValue="1" Step="1">

                        </YAxis2>

                  </PlotArea>

                  <Series>

                        <telerik:ChartSeries Name="Series 1" Type="Pie" Appearance-ShowLabels="true" Appearance-LegendDisplayMode="Nothing" >

                              <Items>

                                    <telerik:ChartSeriesItem YValue="60" Name="F" Label-TextBlock-Text="F #%" ></telerik:ChartSeriesItem>

                                    <telerik:ChartSeriesItem YValue="20" Name="P" Label-TextBlock-Text="P #%" Label-Appearance-Visible="true"></telerik:ChartSeriesItem>

                                    <telerik:ChartSeriesItem YValue="20" Name="C" Label-TextBlock-Text="C #%" ></telerik:ChartSeriesItem>

                              </Items>

                        </telerik:ChartSeries>                   

                  </Series>

            </telerik:RadChart>

 

            <telerik:RadChart ID="RadChart2" runat="server" SkinsOverrideStyles="false" Width="240px" Height="400px" ChartTitle-TextBlock-Text="Chart" ChartTitle-Appearance-Visible="false">

                  <PlotArea Appearance-Dimensions-Margins="0px">

                        <XAxis MaxValue="5" MinValue="1" Step="1">

                        </XAxis>

                        <YAxis MaxValue="25" Step="5">

                        </YAxis>

                        <YAxis2 MaxValue="5" MinValue="1" Step="1">

                        </YAxis2>

                  </PlotArea>

                  <Series>

                        <telerik:ChartSeries Name="Series 1" Type="Pie" Appearance-ShowLabels="true" Appearance-LegendDisplayMode="Nothing" >

                              <Items>

                                    <telerik:ChartSeriesItem YValue="60" Name="F" Label-TextBlock-Text="F #%" ></telerik:ChartSeriesItem>

                                    <telerik:ChartSeriesItem YValue="20" Name="P" Label-TextBlock-Text="P #%" Label-Appearance-Visible="true"></telerik:ChartSeriesItem>

                                    <telerik:ChartSeriesItem YValue="20" Name="C" Label-TextBlock-Text="C #%" ></telerik:ChartSeriesItem>

                              </Items>

                        </telerik:ChartSeries>                   

                  </Series>

            </telerik:RadChart>

       

    </form>

</body>

</html>

 

If I replace the two graphs with asp:Panel, they work as expected, no flicker at all:

<asp:Panel ID="RadChart1" runat="server" Width="240px" Height="400px" BackColor="Red">
</asp:Panel>

<asp:Panel ID="RadChart2" runat="server" Width="240px" Height="400px" BackColor="Blue">
</asp:Panel>

 

Thanks,

 

Teo

Sebastian
Telerik team
 answered on 17 Jun 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Tien
Top achievements
Rank 1
Iron
Krasimir
Top achievements
Rank 3
Bronze
Iron
Iron
Cedar
Top achievements
Rank 1
Iron
Emil
Top achievements
Rank 1
Iron
Kyle Watson
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?