Telerik Forums
UI for ASP.NET AJAX Forum
5 answers
213 views
hi guys,
i'm loading a web page into radwindow....the my code to close the radwindow is:
function GetRadWindow() {
    var oWindow = null;
    if (window.radWindow) oWindow = window.radWindow;
    else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
    return oWindow;
}
function Close() {
    GetRadWindow().close();
}
 
and i call it form code behind with this code:

Protected Sub Imgbtnclose_Click(sender As Object, e As System.Web.UI.ImageClickEventArgs) Handles Imgbtnclose.Click
    Me.ClientScript.RegisterStartupScript(Me.GetType, "", "Close();", True)
End Sub

now in this page there's a radupload object and a custom validator objcect that i used to see the extension error and the code is:

<asp:CustomValidator ID="CustomValidator1" runat="server"
    ClientValidationFunction="validateRadUpload"
    ErrorMessage="Extension error" Font-Bold="True" ForeColor="Red"
    OnServerValidate="CustomValidator1_ServerValidate"
    ValidationGroup="carica"></asp:CustomValidator>
 
    function validateRadUpload(source, e) {
        e.IsValid = false;
        var upload = $find("<%= RadUpload1.ClientID %>");
        var inputs = upload.getFileInputs();
        for (var i = 0; i < inputs.length; i++) {
            //check for empty string or invalid extension    
            if (inputs[i].value != "" && upload.isExtensionValid(inputs[i].value)) {
                e.IsValid = true;
                break;
            }
        }
    }

all this code is ok, but when click on close button for close the radwindow, start the custom validator and start the message error. I would that when click on close button, don't start the validator code but start the code close the radwindow.

Why can i do it?

Thanks












Marin Bratanov
Telerik team
 answered on 17 Dec 2012
2 answers
287 views
Is there a way to get my FilterTemplates aligned with my header (and items)? I've aligned my headers and items left, but the filter is still stuck in the middle. Snippet, details omitted:

<MasterTableView TableLayout="Fixed">
  <Columns>
    <telerik:GridBoundColumn UniqueName=HeaderText="User Name">
      <HeaderStyle HorizontalAlign="Left"/>
      <ItemStyle HorizontalAlign="Left"/>
      <FilterTemplate>
        <telerik:RadTextBox/>
          <telerik:RadScriptBlock >
            <script type="text/javascript">
                  // filter code
            </script>
          </telerik:RadScriptBlock>
      </FilterTemplate>
    </telerik:GridBoundColumn>
  </Columns>
</MasterTableView>

Edit for clarity: Is there a way to do it declaratively?
J
Top achievements
Rank 1
 answered on 17 Dec 2012
1 answer
150 views
How can I get RadGrid into a custom layout. Is the layout (attached) to complicated for RadGrid???
Galin
Telerik team
 answered on 17 Dec 2012
1 answer
106 views
Hi

It seems every time I try to use the RadUpload controls I spend a long time getting it to run correctly, so this time I thought I would go by the book.  (as in 'Getting Started' section of RadUpload online help) but on the live server  (windows 2008 server / iis with asp.net 4.0 on this website) the progress area does not fire, even with files that take several seconds to upload. It works on the localhost but I had to use 24 Meg file to see it.

I used the smart tag in the RadProgress manager to register the RadUploadProgressArea and RadUploadModule.

Where to check now?

I have this code:

ASPX PAGE
 
<telerik:RadProgressManager ID="RadProgressManager1" Runat="server" />
    <telerik:RadUpload ID="RadUpload1" runat="server" AllowedFileExtensions=".doc,.docx,.pdf" ControlObjectsVisibility="RemoveButtons, ClearButtons, AddButton" MaxFileInputsCount="3" MaxFileSize="1100000" OverwriteExistingFiles="True" Skin="WebBlue" TargetFolder="~/members/docs" InputSize="35"></telerik:RadUpload>
     <asp:CustomValidator runat="server" ID="CustomValidator1" Display="Dynamic" ClientValidationFunction="validateRadUpload1"
    OnServerValidate="CustomValidator1_ServerValidate">       
    <span style="color:red; font-weight:bold;"><br />Invalid file: too large or not of type .doc , .docx or .pdf</span>.
</asp:CustomValidator>
     
    
    <asp:Button ID="Button1" runat="server" Text="SUBMIT" />
 
<script type="text/javascript">
        function validateRadUpload1(source, arguments) {
            arguments.IsValid = $find("<%= RadUpload1.ClientID %>").validateExtensions();
    }
</script>
    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server" DisplayCancelButton="True" ProgressIndicators="TotalProgressBar, TotalProgress, RequestSize, FilesCountBar, FilesCount, SelectedFilesCount, CurrentFileName, TimeElapsed, TimeEstimated, TransferSpeed" Skin="WebBlue" Culture="en-GB">
    </telerik:RadProgressArea>
 
CODE BEHIND
 
Protected Sub CustomValidator1_ServerValidate(source As Object, e As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
        e.IsValid = (RadUpload1.InvalidFiles.Count = 0)
End Sub
 
WEB.CONFIG
.....
 
<system.web>
 
   <httpHandlers>
       <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false" />
       <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false" />
       <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false" />
       <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false" />
   </httpHandlers>
 
   <httpModules>
        <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" />
   </httpModules>
 
</system.web>

<system.webServer>
    <validation validateIntegratedModeConfiguration="false" />
    <modules runAllManagedModulesForAllRequests="true">
      <add name="RadUploadModule" preCondition="integratedMode" type="Telerik.Web.UI.RadUploadHttpModule" />
    </modules>
    <handlers>
      <add name="Telerik_Web_UI_WebResource_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" />
      <add name="Telerik_Web_UI_DialogHandler_aspx" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" />
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" verb="*" preCondition="integratedMode" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" />
      <add name="Telerik_RadUploadProgressHandler_ashx" verb="*" preCondition="integratedMode" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" />
    </handlers>
    <httpErrors>
      <remove statusCode="404" subStatusCode="-1" />
      <error statusCode="404" prefixLanguageFilePath="" path="/error404.aspx" responseMode="ExecuteURL" />
    </httpErrors>
  </system.webServer>

 
....

Plamen
Telerik team
 answered on 17 Dec 2012
1 answer
109 views
Hi,

I have a design problem with Advanced Form.

If you have smaller resolution, you won’t be able to see the Save and Cancel buttons in the Advanced Form window when creating or editing an appointment .

How can i fix the Advanced Form height and weidth for any resolution.

Thanks,
Chandu.D
Plamen
Telerik team
 answered on 17 Dec 2012
1 answer
143 views
How can i hide the textbox in radasyncupload? 
Princy
Top achievements
Rank 2
 answered on 17 Dec 2012
3 answers
364 views
Please somebody help me how to break the lines and how to give space between words in PDF while exporting from Radgrid.
Kostadin
Telerik team
 answered on 17 Dec 2012
4 answers
591 views
Hello,

I am using a radsplitter/radpane in my application (inside a Master page if that changes things) with width/height set to 100% (filling the browser).

When loading the page in chrome, everything loads pretty quickly and visually the page looks fine.

when loading the page in IE, however, there is a brief lag period in the initial loading of the page where the radsplitter is initially quite small (on the order of 500px or so) while the content is loading.

i am assuming that IE renders its content differently somehow in such a way that it cannot calculate the full height of the browser until after the full page load... (that, or the javascript function to recalculate the height of the control is just fired much later in IE?)

what i am asking is:  is there a way to set an "initial width" to the radsplitter so that when it loads it looks more reasonable (say 1000px or something) and then adjusts itself to 100% when it is ready?

Thanks.
Vessy
Telerik team
 answered on 17 Dec 2012
1 answer
240 views
How can i loop through all items in a radpanelbar? 
Princy
Top achievements
Rank 2
 answered on 17 Dec 2012
3 answers
155 views
Sorry for the header... it's Windows 8 and IE 10, as well as Chrome and Firefox.

My client has a new laptop with Windows 8 and IE 10 and says everything with the website I've developed is a mess and doesn't work right pertaining to the RadControls. I don't have Windows 8 and IE10 so there's no way for me to test it.

What are the known issues with Windows 8? Have you done thorough testing with Telerik and Windows 8?

Has anyone else installed Windows 8 and IE10/Chrome/Firefox and found problems?

thanks.
Maria Ilieva
Telerik team
 answered on 17 Dec 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?