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

Lost the scrollbar when using HeaderTemplate in Explorer and Firefox.

Works in Chrome...

Ivan Danchev
Telerik team
 answered on 09 Mar 2016
1 answer
136 views

Hi,

We're using your RadFileExplorer as imagepicker in our software and are trying to improve the performance of it.
Some users don't sort their images into subfolders but puts all of their images in the root folder, with results high performance drop when not using pager with more than 2000 images in one folder (especially with slow internet connections).

Without pager: 20 seconds until 2 minutes to load
With pager: 5 until 10 seconds to load

But still very slow, we're targeting to 2~3 seconds (maximal).

It seems the thumbnail mode don't caches the generated views because the performance difference between grid and thumbnail modes is very huge, after first load as well. The grid mode seems loads within 1,5 seconds which thumbnail mode takes 5 until 10 seconds.

How we can improve the performance of the FileExplorer with thumbnail mode?

Vessy
Telerik team
 answered on 09 Mar 2016
23 answers
1.2K+ views
I'm getting the following script errors on this very simple example site.

Line: 6
Error: 'jQuery' is undefined

Line: 8
Error: '$telerik' is undefined

The ScriptManager is not loading my jquery reference.  Afterward, the embedded jquery 1.9.1 is loaded (even though i have EnableEmbeddedjQuery set to false) and it tries to assign it to $telerik, which isn't defined.

default.aspx

<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server" EnableCdn="true" EnableEmbeddedjQuery="false" >
        <Scripts>           
            <telerik:RadScriptReference Name="jquery"   />
            <telerik:RadScriptReference Name="jquery-ui" />
        </Scripts>
    </telerik:RadScriptManager>
    <div>
    </div>
        <asp:Login ID="Login1" runat="server"></asp:Login>
    </form>
</body>
</html>


web.config

<?xml version="1.0"?>
<configuration>
  <appSettings>
    <add key="Telerik.Skin" value="Silk"/>
    <add key="Telerik.ScriptManager.TelerikCdn" value="Enabled"/>
    <add key="Telerik.StyleSheetManager.TelerikCdn" value="Enabled"/>
  </appSettings>
  <system.web>
    <compilation debug="true" targetFramework="4.5"/>
    <httpRuntime targetFramework="4.5"/>
    <pages>
      <controls>
        <add tagPrefix="telerik" namespace="Telerik.Web.UI" assembly="Telerik.Web.UI"/>
      </controls>
    </pages>
    <httpHandlers>
      <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="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule"/>
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression"/>
    </httpModules>
  </system.web>
  <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <modules runAllManagedModulesForAllRequests="true">
      <remove name="RadUploadModule"/>
      <add name="RadUploadModule" type="Telerik.Web.UI.RadUploadHttpModule" preCondition="integratedMode"/>
      <remove name="RadCompression"/>
      <add name="RadCompression" type="Telerik.Web.UI.RadCompression" preCondition="integratedMode"/>
    </modules>
    <handlers>
      <remove name="ChartImage_axd"/>
      <add name="ChartImage_axd" path="ChartImage.axd" type="Telerik.Web.UI.ChartHttpHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_SpellCheckHandler_axd"/>
      <add name="Telerik_Web_UI_SpellCheckHandler_axd" path="Telerik.Web.UI.SpellCheckHandler.axd" type="Telerik.Web.UI.SpellCheckHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_DialogHandler_aspx"/>
      <add name="Telerik_Web_UI_DialogHandler_aspx" path="Telerik.Web.UI.DialogHandler.aspx" type="Telerik.Web.UI.DialogHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_RadUploadProgressHandler_ashx"/>
      <add name="Telerik_RadUploadProgressHandler_ashx" path="Telerik.RadUploadProgressHandler.ashx" type="Telerik.Web.UI.RadUploadProgressHandler" verb="*" preCondition="integratedMode"/>
      <remove name="Telerik_Web_UI_WebResource_axd"/>
      <add name="Telerik_Web_UI_WebResource_axd" path="Telerik.Web.UI.WebResource.axd" type="Telerik.Web.UI.WebResource" verb="*" preCondition="integratedMode"/>
    </handlers>
  </system.webServer>
</configuration>


Global.asax

<%@ Application Language="C#" %>
 
<script runat="server">
 
    void Application_Start(object sender, EventArgs e)
    {
        // Code that runs on application startup
        string jqueryversion = "1.10.2";
        ScriptManager.ScriptResourceMapping.AddDefinition("jquery",
            new ScriptResourceDefinition
            {
                CdnSupportsSecureConnection = true,
                Path = "~/javascript/jquery-" + jqueryversion + ".min.js",
                DebugPath = "~/javascript/jquery-" + jqueryversion + ".min.js",
                CdnPath = "//ajax.aspnetcdn.com/ajax/jquery/jquery-" + jqueryversion + ".min.js",
                CdnDebugPath = "//ajax.aspnetcdn.com/ajax/jquery/jquery-" + jqueryversion + ".js"
            });
 
        string jqueryuiversion = "1.9.2";
        ScriptManager.ScriptResourceMapping.AddDefinition("jquery-ui",
            new ScriptResourceDefinition
            {
                CdnSupportsSecureConnection = true,
                Path = "~/javascript/jquery-ui-" + jqueryuiversion + ".min.js",
                DebugPath = "~/javascript/jquery-ui-" + jqueryuiversion + ".min.js",
                CdnPath = "//ajax.aspnetcdn.com/ajax/jquery.ui/" + jqueryuiversion + "/jquery-ui.min.js",
                CdnDebugPath = "//ajax.aspnetcdn.com/ajax/jquery.ui/" + jqueryuiversion + "/jquery-ui.js"
            });
    }
     
    void Application_End(object sender, EventArgs e)
    {
        //  Code that runs on application shutdown
 
    }
         
    void Application_Error(object sender, EventArgs e)
    {
        // Code that runs when an unhandled error occurs
 
    }
 
    void Session_Start(object sender, EventArgs e)
    {       
 
        // Code that runs when a new session is started
         
    }
 
    void Session_End(object sender, EventArgs e)
    {
        // Code that runs when a session ends.
        // Note: The Session_End event is raised only when the sessionstate mode
        // is set to InProc in the Web.config file. If session mode is set to StateServer
        // or SQLServer, the event is not raised.
 
    }
        
</script>


I can't seem to solve this RadScriptManager black box.  Help!





Charles
Top achievements
Rank 1
 answered on 09 Mar 2016
1 answer
276 views

Hi,

I have a RadGrid that opens inside of a RadWindow.  The user can re-order the rows by drag and drop, but if the grid is longer than the height of the RadWindow, it does not scroll.  Is there a way to scroll the RadWindow as the user is moving the item down the list?

Viktor Tachev
Telerik team
 answered on 09 Mar 2016
2 answers
469 views

We would like to set the width of columns in xlsx export from a RadGrid. I do this by using e.ExportStructure.Tables[0].Columns in the InfrastructureExporting event handler. If columns are declaratively set in the aspx file when this works fine.

If, however, the columns of the RadGrid are added by setting AutoGenerateColumns="true" or manually in Page_Load, then the Columns collection is empty. Why is this, and are there some other way to set the width of the columns in the xlsx file?

ASPX:

<telerik:RadGrid ID="RadGrid1" runat="server" AutoGenerateColumns="true" OnNeedDataSource="RadGrid1_NeedDataSource" OnInfrastructureExporting="RadGrid1_InfrastructureExporting">
   <ExportSettings Excel-Format="Xlsx" />
</telerik:RadGrid>
<asp:Button ID="Button1" runat="server" OnClick="Button1_Click" />

.cs:

public class Person
{
   public string ID { get; set; }
   public string Name { get; set; }
   public DateTime? Date { get; set; }
}

protected void RadGrid1_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
{
   RadGrid1.DataSource = new List<Person> {
     new Person { ID = "1", Name = "Adam", Date = new DateTime(1973, 4, 12) },
     new Person { ID = "2", Name = "Bertil", Date = null },
     new Person { ID = "3", Name = "Ceasar", Date = new DateTime(1973, 10, 27) },
   };
}

protected void Button1_Click(object sender, EventArgs e)
{
   RadGrid1.MasterTableView.ExportToExcel();
}

protected void RadGrid1_InfrastructureExporting(object sender, Telerik.Web.UI.GridInfrastructureExportingEventArgs e)
{
  e.ExportStructure.ColumnWidthUnit = Telerik.Web.UI.ExportInfrastructure.ExportUnitType.FormatDefault;

  // ERROR: The Columns collection is empty if the columns of radgrid are auto-generated or dynamically added in code behind
  foreach (var col in e.ExportStructure.Tables[0].Columns)
  {
    col.Width = 20;
  }
}

 

/Patrik

Lars-Marcus
Top achievements
Rank 1
 answered on 09 Mar 2016
2 answers
206 views

I have a chart with about 1500 items and a period from December 2014 to today. if I were in the navigator the range selector move he always jumps by 1 month. this can be set the range of the selector can be moved per day?
Also me the entire period shown on the left outside of the navigator and the right I can not choose to this day (show Attachment)...

Can you help me? Thanks

Stamo Gochev
Telerik team
 answered on 09 Mar 2016
1 answer
125 views

Hello dear friends.
There are combo box to "Checkbox" feature, how to get the name of the selected items?
With my 100 Russian rubles for beer)

Eyup
Telerik team
 answered on 09 Mar 2016
1 answer
110 views

Hi,

 

I have issue with editmode, When I use automatic update works great, but I want use my template to edit, and when I use usercontrol they don;t update my data, they put empty string to it. Below my code, thanks for any feedback.

Index.aspx

<asp:SqlDataSource ID="ListaRejestr" runat="server"
 
            ConnectionString="<%$ ConnectionStrings:ISAConnectionString2 %>"
 
            UpdateCommand="UPDATE tb_upowaznienSystem SET data_wydania = @data_wydania WHERE nr_upowaznienia = @nr_upowaznienia"
 
  
 
            SelectCommand="lista_uzytkownikow"
 
            SelectCommandType="StoredProcedure">
 
            <SelectParameters>
 
                <asp:SessionParameter Name="iduzytkownika" SessionField="id_komorki"
 
                    DefaultValue="" />
 
                <asp:ControlParameter ControlID="drop_rejestrSytem" Name="systemDrop"
 
                    PropertyName="SelectedValue" />
 
                <asp:SessionParameter Name="CzySystemOgolny" SessionField="CzySystemOgolny"
 
                    Type="String" />
 
                <asp:SessionParameter DefaultValue="" Name="administrator_systemu"
 
                    SessionField="administrator_systemu" Type="String" />
 
            </SelectParameters>
 
            <UpdateParameters>
 
                <asp:Parameter Name="data_wydania" />
 
                <asp:Parameter Name="nr_upowaznienia" />
 
            </UpdateParameters>
 
        </asp:SqlDataSource>
 
        <br />
 
        <telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" AllowSorting="True" Culture="pl-PL" DataSourceID="ListaRejestr" GroupPanelPosition="Top" AllowAutomaticUpdates="True" AutoGenerateColumns="False" >
 
            <GroupingSettings CollapseAllTooltip="Collapse all groups" />
 
            <ExportSettings>
 
                <Pdf PageWidth="">
 
                </Pdf>
 
            </ExportSettings>
 
            <MasterTableView DataSourceID="ListaRejestr" AllowAutomaticUpdates="True" PageSize="20" ClientDataKeyNames="nr_upowaznienia" DataKeyNames="nr_upowaznienia">
 
                <CommandItemSettings ShowAddNewRecordButton="False" />
 
                <Columns>
 
                    <telerik:GridEditCommandColumn CancelText="Anuluj" EditText="Data nadania" HeaderText="Data nadania" InsertText="WyÅ›lij" UpdateText="Aktualizuj">
 
                    </telerik:GridEditCommandColumn>
 
                    <telerik:GridBoundColumn DataField="id_upowaznieniaSystem" FilterControlAltText="Filter column column" HeaderText="id_upowaznieniaSystem" UniqueName="column">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="nr_upowaznienia" FilterControlAltText="Filter column1 column" HeaderText="nr_upowaznienia" UniqueName="nr_upowaznienia">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="data_wydania" FilterControlAltText="Filter column2 column" HeaderText="data_wydania" UniqueName="data_wydania">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="data_cofniecia" FilterControlAltText="Filter column3 column" HeaderText="data_cofniecia" UniqueName="column3">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="system" FilterControlAltText="Filter column4 column" HeaderText="system" UniqueName="column4">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="zakres_upowaznienia" FilterControlAltText="Filter column5 column" HeaderText="zakres_upowaznienia" UniqueName="column5">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="nazwisko" FilterControlAltText="Filter column6 column" HeaderText="nazwisko" UniqueName="nazwisko">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="imie" FilterControlAltText="Filter column7 column" HeaderText="imie" UniqueName="column7">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="identyfikator" FilterControlAltText="Filter column8 column" HeaderText="identyfikator" UniqueName="column8">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="id_uzytkownik" FilterControlAltText="Filter column9 column" HeaderText="Upoważnienie ogólne" UniqueName="column9">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="nazwa_komorki" FilterControlAltText="Filter column10 column" HeaderText="nazwa_komorki" UniqueName="column10">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="nazwa_wydzialu" FilterControlAltText="Filter column11 column" HeaderText="nazwa_wydzialu" UniqueName="column11">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="stanowisko" FilterControlAltText="Filter column12 column" HeaderText="stanowisko" UniqueName="column12">
 
                    </telerik:GridBoundColumn>
 
                    <telerik:GridBoundColumn DataField="nr_poprz" FilterControlAltText="Filter column13 column" HeaderText="nr_poprz" UniqueName="column13">
 
                    </telerik:GridBoundColumn>
 
                </Columns>
 
                <EditFormSettings UserControlName="data_wydania_form.ascx" EditFormType="WebUserControl">
 
                    <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
 
                    </EditColumn>
 
                </EditFormSettings>
 
            </MasterTableView>
 
        </telerik:RadGrid>

data_wydania_form.ascx

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="data_wydania_form.ascx.cs" Inherits="data_wydania_form" %>
 
<%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %>
 
<table>
 
    <tr>
 
        <td>
 
            Data nadania:
 
        </td>
 
    </tr>
 
    <tr>
 
       <td>
 
         <asp:TextBox ID="data_wydania" DbSelectedDate='<%# DataBinder.Eval(Container, "DataItem.data_wydania") %>' runat="server" TabIndex="1"></asp:TextBox>
 
        </td>
 
    </tr>
 
    <tr>
 
        <td>
 
             <asp:Button ID="btnUpdate" Text="Aktualizuj" runat="server" CommandName="Update" CausesValidation="false"></asp:Button> 
 
             <asp:Button ID="btnCancel" Text="Anuluj" runat="server" CausesValidation="False" CommandName="Cancel"></asp:Button>
 
  
 
        </td>
 
  
 
    </tr>
 
</table>

 

 

regards

 

Pavlina
Telerik team
 answered on 09 Mar 2016
1 answer
129 views

Hi

The disabled class rfdInputDisabled is not getting applied in IE for checkbox.

I am using IE11 and Telerik version 2016.1.225.45.

The rfdInputDisabled class is applied in IE7 but not in IE11. Please see the attached images. Could you please help on this?

Below is my code

<body>
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" Skin="Office2007"
        EnableRoundedCorners="false" />
    <form id="form1" runat="server">
          <telerik:RadScriptManager ID="RadScriptManager1" runat="server" AsyncPostBackTimeout="600" AllowCustomErrorsRedirect="true">
            <Scripts>
                <asp:ScriptReference Name="Telerik.Web.UI.Common.Core.js" Assembly="Telerik.Web.UI" />
            </Scripts>
        </telerik:RadScriptManager>
    <div>
         <asp:CheckBox ID="checkboxDis" runat="server" Text="Some Text"
                                        Enabled="false" TextAlign="Left" BorderColor="Black"  />
         
    </div>
    </form>
</body>

Konstantin Dikov
Telerik team
 answered on 09 Mar 2016
12 answers
550 views
Greetings,

RadGrid, while in the batch mode, keeps items locally until saveChanges (or any of the other save methods) is called. It then serializes the items to a string and posts it to the server.

What if I have other controls on the page that cause post backs?
For example, on a master details form, the user will enter data in the header then add/edit/delete some records to the grid, then clicks the save button of the form. The grid won't raise any events then and the grid data will be lost as it wasn't sent as part of the request.
Is my understanding right? Or there's a method to make batch mode grids participate in post backs like simple controls do?

I ask this because I may have more complex forms with multi level of details and each level will have its batch mode grid, and I can't make any of the grids initiate the post back using saveChanges.
Angel Petrov
Telerik team
 answered on 09 Mar 2016
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
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
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?