Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
298 views
Hello

I have been treking through the forums and documentation to find out how to do this and I am throughly confused!
My Website has a flag that can be changed and when this happens we re-load all the text on the site files.
I can transate the column headers by doing something like this:

 

RadGrid1.Columns[3].HeaderText = Translations.Common.ColumnName 

  

 

 

 

but cannot work out how to do the pager.

I am using the default pager, (ie I haven't set it to anything specific) currently the pager shows
 |< < 12 > >| page size <a dropdown>      .......  11 items in 2 pages

Can I just pass the culture to the grid and it will do it automatically? or is that just wishful thinking and I have to do it my self? Ideally I don't want a custom pager, but I don't get how to get access to the bits to be able to translate the default one?

Thanks in advance

 

Princy
Top achievements
Rank 2
 answered on 29 Oct 2009
4 answers
226 views
Hi, I've got a problem with checking file size on upload. There is not RadUpload object in arguments so line in checkUploadedFilesSize function with args.get_progressData().RadUpload.RequestSize generates error. I searched everywhere for solution, most info linked to
this site: http://www.telerik.com/help/aspnet-ajax/upload_howtoclientfilesize.html, but it doesn't help. I use 2009.2.701.35 version of library.
Here is my aspx markup:
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="Default" %> 
 
<!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
</head> 
<body> 
    <form id="form1" runat="server"
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
        <Scripts> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" /> 
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" /> 
        </Scripts> 
    </telerik:RadScriptManager> 
    <div> 
 
        <script type="text/javascript"
            function checkUploadedFilesSize(progressArea, args) { 
                //progressArea.confirmed is a custom variable, 
                // you can use another if you want to 
                if (!progressArea.confirmed && 
       args.get_progressData().RadUpload.RequestSize > 1000000) { 
                    if (confirm("The total size of the selected files" + 
                 " is more than the limit." + 
                 " Do you want to cancel the upload?")) { 
                        progressArea.cancelRequest(); 
                    } 
                    else { 
                        progressArea.confirmed = "confirmed"
                    } 
                } 
            } 
        </script> 
 
        <telerik:RadUpload runat="server" ID="RadUpload1" /> 
        <telerik:RadProgressArea runat="server" ID="RadProgressArea1" OnClientProgressUpdating="checkUploadedFilesSize" /> 
        <telerik:RadProgressManager runat="server" ID="RadProgressManager1" /> 
        <asp:Button runat="server" ID="Button1" Text="Upload" OnClick="buttonSubmit_Click" /> 
    </div> 
    </form> 
</body> 
</html> 
 

here is my code behind code:
using System; 
 
using Telerik.Web.UI; 
using Telerik.Web.UI.Upload; 
 
public partial class Default : System.Web.UI.Page  
    protected void Page_Load(object sender, EventArgs e) 
    { 
            if (!IsPostBack) 
            { 
                //Do not display SelectedFilesCount progress indicator. 
                RadProgressArea1.ProgressIndicators &= ~ProgressIndicators.SelectedFilesCount; 
            } 
 
        } 
 
        protected void buttonSubmit_Click(object sender, System.EventArgs e) 
        { 
            UploadedFile file = RadUpload1.UploadedFiles[0]; //UploadedFile.FromHttpPostedFile(Request.Files[inputFile.UniqueID]); 
 
            if(!Object.Equals(file, null)) 
            { 
                LooongMethodWhichUpdatesTheProgressContext(file); 
            } 
        } 
 
        private void LooongMethodWhichUpdatesTheProgressContext(UploadedFile file) 
        { 
            const int total = 100
 
            RadProgressContext progress = RadProgressContext.Current; 
 
            for (int i = 0; i < total; i++) 
            { 
                progress.PrimaryTotal = 1
                progress.PrimaryValue = 1
                progress.PrimaryPercent = 100
 
                progress.SecondaryTotal = total
                progress.SecondaryValue = i
                progress.SecondaryPercent = i
 
                progress.CurrentOperationText = file.GetName() + " is being processed..."; 
 
                if (!Response.IsClientConnected) 
                { 
                    //Cancel button was clicked or the browser was closed, so stop processing 
                    break; 
                } 
 
                //Stall the current thread for 0.1 seconds 
                System.Threading.Thread.Sleep(100); 
            } 
        }    
 

and to be sure here is my web.config (it's more or less template from telerik project template)
<?xml version="1.0"?> 
<configuration> 
    <configSections> 
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                <section name="scriptResourceHandler" type="System.Web.Configuration.ScriptingScriptResourceHandlerSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                <sectionGroup name="webServices" type="System.Web.Configuration.ScriptingWebServicesSectionGroup, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
                    <section name="jsonSerialization" type="System.Web.Configuration.ScriptingJsonSerializationSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="Everywhere"/> 
                    <section name="profileService" type="System.Web.Configuration.ScriptingProfileServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <section name="authenticationService" type="System.Web.Configuration.ScriptingAuthenticationServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                    <section name="roleService" type="System.Web.Configuration.ScriptingRoleServiceSection, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" requirePermission="false" allowDefinition="MachineToApplication"/> 
                </sectionGroup> 
            </sectionGroup> 
        </sectionGroup> 
    </configSections> 
    <appSettings/> 
    <connectionStrings/> 
    <system.web> 
        <compilation debug="true"
            <assemblies> 
                <add assembly="System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add assembly="System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
                <add assembly="System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089"/> 
            </assemblies> 
        </compilation> 
        <pages> 
            <controls> 
                <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
                <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/> 
            </controls> 
        </pages> 
        <authentication mode="Windows"/> 
        <httpHandlers> 
            <remove verb="*" path="*.asmx"/> 
            <add verb="*" path="*.asmx" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add verb="*" path="*_AppService.axd" validate="false" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" validate="false"/> 
            <add path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" validate="false"/> 
            <add path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" validate="false"/> 
            <add path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" validate="false"/> 
            <add path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" validate="false"/> 
            <add path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" validate="false"/> 
        </httpHandlers> 
        <httpModules> 
            <add name="ScriptModule" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/> 
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/> 
        </httpModules> 
    <httpRuntime maxRequestLength="102400" executionTimeout="3600"/> 
  </system.web> 
    <system.codedom> 
        <compilers> 
            <compiler language="c#;cs;csharp" extension=".cs" warningLevel="4" type="Microsoft.CSharp.CSharpCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                <providerOption name="CompilerVersion" value="v3.5"/> 
                <providerOption name="WarnAsError" value="false"/> 
            </compiler> 
            <compiler language="vb;vbs;visualbasic;vbscript" extension=".vb" warningLevel="4" type="Microsoft.VisualBasic.VBCodeProvider, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"
                <providerOption name="CompilerVersion" value="v3.5"/> 
                <providerOption name="OptionInfer" value="true"/> 
                <providerOption name="WarnAsError" value="false"/> 
            </compiler> 
        </compilers> 
    </system.codedom> 
 
    <system.webServer> 
        <validation validateIntegratedModeConfiguration="false"/> 
        <modules> 
            <remove name="ScriptModule"/> 
            <add name="ScriptModule" preCondition="managedHandler" type="System.Web.Handlers.ScriptModule, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/> 
            <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/> 
        </modules> 
        <handlers> 
            <remove name="WebServiceHandlerFactory-Integrated"/> 
            <remove name="ScriptHandlerFactory"/> 
            <remove name="ScriptHandlerFactoryAppServices"/> 
            <remove name="ScriptResource"/> 
            <add name="ScriptHandlerFactory" verb="*" path="*.asmx" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptHandlerFactoryAppServices" verb="*" path="*_AppService.axd" preCondition="integratedMode" type="System.Web.Script.Services.ScriptHandlerFactory, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ScriptResource" preCondition="integratedMode" verb="GET,HEAD" path="ScriptResource.axd" type="System.Web.Handlers.ScriptResourceHandler, System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/> 
            <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
            <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode,runtimeVersionv2.0"/> 
        </handlers> 
    <security> 
      <requestFiltering> 
        <requestLimits maxAllowedContentLength="1024000000" /> 
      </requestFiltering> 
    </security> 
  </system.webServer> 
    <runtime> 
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1"
            <dependentAssembly> 
                <assemblyIdentity name="System.Web.Extensions" publicKeyToken="31bf3856ad364e35"/> 
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
            </dependentAssembly> 
            <dependentAssembly> 
                <assemblyIdentity name="System.Web.Extensions.Design" publicKeyToken="31bf3856ad364e35"/> 
                <bindingRedirect oldVersion="1.0.0.0-1.1.0.0" newVersion="3.5.0.0"/> 
            </dependentAssembly> 
        </assemblyBinding> 
    </runtime> 
</configuration> 

Genady Sergeev
Telerik team
 answered on 29 Oct 2009
1 answer
142 views
Hi, I'm working with a grid and when I go  in the updateCommand  procedure, I try to get the uploadFileContent, but alwasy is null, some one can help me? I have this code.
 Protected Sub gridGaleria_UpdateCommand(ByVal source As ObjectByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles gridGaleria.UpdateCommand 
        If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then 
 
            Dim editItem As GridEditableItem = DirectCast(e.Item, GridEditableItem) 
            Dim upload As GridBinaryImageColumnEditor = DirectCast(editItem.EditManager.GetColumnEditor("Upload"), GridBinaryImageColumnEditor) 
            Dim db As New aulaDataContext 
            If upload.UploadedFileContent.Count > 0 Then 
                Dim evenFoto = From ev In db.eventosFotos _ 
                           Where ev.idEventoFoto = 1 _ 
                           Select ev 
                For Each renglon In evenFoto 
                    renglon.pathArchivo =     upload.RadUploadControl.UploadedFiles.Item(0).FileName 
                    db.SubmitChanges() 
                Next 
 
            End If 
        End If 
    End Sub 

Sebastian
Telerik team
 answered on 29 Oct 2009
1 answer
64 views
Hi

I'm new to using web services with radcombo boxes

I've gotten that far and its working well

I would like to add another item to the radcombo specified by me but building the radcombo with this 1 item screws up the box and you either see the appended item or the web service stuff and not both

Any ideas?
Veselin Vasilev
Telerik team
 answered on 29 Oct 2009
1 answer
141 views
I want to put a button in the NoRecordsTemplate of a grid
Unfortunately the code-behind doesn' t recognize the ID of the button(Error    The name 'cmdButton' does not exist in the current context)

<NoRecordsTemplate> 
   <asp:Button ID="cmdButton" /> 
</NoRecordsTemplate> 

cmdButton.Visible = false
 
Princy
Top achievements
Rank 2
 answered on 29 Oct 2009
1 answer
150 views
Hi,

I am using RadMenu control with MOSS 2007 & PortalSiteMapDataSource. I am looking for a way to remove the tooltip generated by the menu control in order to reduce the amount of html generated. Is there an easy way to achieve this?

Veselin Vasilev
Telerik team
 answered on 29 Oct 2009
3 answers
89 views
Hi ;

we are using Rad Controls 2008 Q2.when you click the hyperlink manger with  firefox 3.5.x. Dialogbox stays behind toolbar see the attachment. It happens once , if you close it and reopen , it works as expected. 

  
Rumen
Telerik team
 answered on 29 Oct 2009
3 answers
297 views

Hi,

We currently have an issue with the radcombox we're still able to write text in it when the allowcustomtext is set to false.
We're simply using a normal data source to bind to the radcombobox. The load on demand isn't use in this page.

The thing is i want to keep the previous selection if there's no match in my list.

Exemple i have a list with yes and no for choice but now empty choice. If i select yes and after try to enter "k" in the combobox it'll erase my old selection and when i'll try to save my selection i'll have a null value that don't exist in my list.

Is there a way to keep the previous selected item when the value entered in the combobox doesn't match with any item present in the list?
This is my combobox declaration:

<telerik:RadComboBox ID="RadComboBox1" TabIndex="90" runat="server" Style="width: 45px;" 
 AllowCustomText="false" RadComboBoxImagePosition="Right">  
  <CollapseAnimation Duration="200" Type="OutQuint" /> 
  <ExpandAnimation Type="OutQuart" /> 
</telerik:RadComboBox> 

Thx for your time
Guillaume
Veselin Vasilev
Telerik team
 answered on 29 Oct 2009
5 answers
204 views
I am posting this here again because I noticed that support page showed that it would take 72 hours and I only have 18 days left. This is wrong and I should have 24 hr priority support and still have 35 days (shows in my account).


Support Ticket : 249168

I am running into an error like this when I use 826 - 1007 build. It was working perfectly on 707.

Error: Sys.ScriptLoadFailedException: The script 'http://www.myurl.com/Javascript.ashx?_TSM_HiddenField_=ctl00_SM1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bTelerik.Web.UI%2c+Version%3d2009.2.920.35%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-US%3a1fefbd7a-6a16-48ea-b50d-cc0ead1945d3%3af7645509%3aaa288e2d' could not be loaded.

Source File: http://www.myurl.com/Javascript.ashx?_TSM_HiddenField_=ctl00_SM1_HiddenField&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d3.5.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-US%3a0d787d5c-3903-4814-ad72-296cea810318%3aea597d4b%3ab25378d2
Line: 15

It so far only happens on one page of my app. The page has a tab and a combo box (I don't have other page that have this combo) so I am wondering if this could be it.

the whole operation fails like the following:

1) on a page with 3 tabs, 3 multipages, and combo box on the last multipage. RadGrid on the first multipage

2) everything is wrapped inside RadAjaxManager operation (Ajaxed)

3) so when a button is clicked on a RadGrid item, we switch to either tab 2 or tab 3 depending on which button is clicked (we have 2 buttons per radgrid item)

4) if we switch to tab 2, it works fine, but when we click to switch to tab 3, the error shows.
Genady Sergeev
Telerik team
 answered on 29 Oct 2009
1 answer
81 views
Hello guys,

I'm developing an application where i'm including a Sharepoint AssetUrlSelector control inside an ASP.Net panel that is hidden when the page is loaded, that panel is inside one RadAjaxPanel. When I show that panel and click on the AssetUrlSelector, one JS error message is displayed, it seems that the web resources of the AssetUrlSelector was not loaded. I tried using a dummy AsetUrlSelector in order to load the necessary JS and CSS files, now, the error message isn't displayed but the AssetUrlSelector does nothing.

Could you tell me another way to get that AssetUrlSelector on my panel please?
Sebastian
Telerik team
 answered on 29 Oct 2009
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?