Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
68 views

I have a search form I'd like to save the user's text when they come back to the form.

I would think RadTextBox would be one of the built-in controls for the persistence framework.

But I don't see it on this page:  http://www.telerik.com/help/aspnet-ajax/persistence-framework-supported-controls.html 

I can very easily add it as a custom setting but why not built in?


Bryan Patrick
Top achievements
Rank 1
 answered on 15 Jan 2015
8 answers
247 views
Hi,

Your new control is great ;)
I'd like to load the dropdown's items dynamically when the user types letters. So each time the user types a letter, a callback would be made to load the dropdown's content.
Is there a built-in feature for that? otherwise, what would be the easiest way to achieve that?
Thanks
Lee Nessling
Top achievements
Rank 1
 answered on 14 Jan 2015
3 answers
109 views
Hello,

I am testing the Grid and I cannot find an option to get rid of the blue border that is displayed once you click anywhere inside the control.

Many thanks,
Tobias
Pavlina
Telerik team
 answered on 14 Jan 2015
1 answer
143 views
Hi,

I have a user control with a combox on it. There is some javascript defined on the user control.

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="RSSA.ascx.cs"
Inherits="Auto.RSSA" %>

<script type="text/javascript">
 
      function Function1() {
}
</script>
<div class="test">
<telerik:RadComboBox ID="SSSL" runat="server" AutoPostBack="True" OnSelectedIndexChanged="SSSL_SelectedIndexChanged" OnClientSelectedIndexChanged="Function1" Width="300px" Filter="Contains">
</telerik:RadComboBox>
</div>


A page has the usercontrol with in updatepanel. the usercontrol is not visible on pageload. the control is made visible after a postback. the radcombox but the javascript is not being loaded. Function1 is undefined.

Any help is appreciated.

Thanks,
TJ
Robert Helm
Top achievements
Rank 1
 answered on 14 Jan 2015
2 answers
227 views
I have the following scenario
- a group of filter , and a Button "Consultar". This button fill the radgrid. (that's working Ok).
- When I try to export to excel the  get "Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index"
This error starts today when I change from free library to the  new library with license.

This is my code:

ASPX:
    <%@ MasterType VirtualPath="~/UI/EstudiosElectricos.Master" %>
        <asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server"></asp:Content>
        <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
            <telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">
                <AjaxSettings>
                    <telerik:AjaxSetting AjaxControlID="btnCalcular">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="lblTotal" />
                            <telerik:AjaxUpdatedControl ControlID="pnlValores" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="tablaFecha" LoadingPanelID="LoadingPanel" /> </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="btnExportToXLS">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="btnExportarXLS" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="Listado" LoadingPanelID="LoadingPanel" /> </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="grillaListado">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="grillaListado" LoadingPanelID="LoadingPanel" /> </UpdatedControls>
                    </telerik:AjaxSetting>
                    <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                        <UpdatedControls>
                            <telerik:AjaxUpdatedControl ControlID="Panel1" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="btnExportToXLS" UpdatePanelRenderMode="Inline" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="Listado" UpdatePanelRenderMode="Inline" LoadingPanelID="LoadingPanel" />
                            <telerik:AjaxUpdatedControl ControlID="grillaListado" LoadingPanelID="LoadingPanel" /> </UpdatedControls>
                    </telerik:AjaxSetting>
                </AjaxSettings>
            </telerik:RadAjaxManagerProxy>
            <div id="Div1">
                <asp:Panel ID="Panel2" GroupingText="Filtros" runat="server" CssClass="pnlFiltroGrande">
                    <asp:Table runat="server" CssClass="Tabla" ID="tablaFecha">
                        <asp:TableHeaderRow>
                            <asp:TableCell CssClass="columna1">Año Desde</asp:TableCell>
                            <asp:TableCell CssClass="columna1">Año Hasta</asp:TableCell>
                            <asp:TableCell CssClass="columna1">Tipo de Proyecto</asp:TableCell>
                            <asp:TableCell CssClass="columna1">País</asp:TableCell>
                            <asp:TableCell CssClass="columna3">
                                <telerik:RadButton ID="btnLimpiar" TabIndex="5" runat="server" AutoPostBack="true" Text="Limpiar" ToolTip="Limpiar los filtros y resultados" OnClick="btnLimpiar_Click">
                                    <Icon PrimaryIconUrl="~/UI/Imagenes/limpiar.png" PrimaryIconWidth="21px" PrimaryIconHeight="25px" PrimaryIconTop="3px" PrimaryIconLeft="5px" /> </telerik:RadButton>
                            </asp:TableCell>
                        </asp:TableHeaderRow>
                        <asp:TableRow>
                            <asp:TableCell CssClass="columna1">
                                <telerik:RadNumericTextBox ID="ntxtAnioDesde" TabIndex="0" runat="server" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" Type="Number" MaxLength="4" MinValue="2000" MaxValue="2200"></telerik:RadNumericTextBox>
                                <label class="validador">*</label>
                                <asp:RequiredFieldValidator ID="fvAnioDesde" runat="server" ControlToValidate="ntxtAnioDesde" ValidationGroup="filtro"></asp:RequiredFieldValidator>
                            </asp:TableCell>
                            <asp:TableCell CssClass="columna1">
                                <telerik:RadNumericTextBox ID="ntxtAnioHasta" TabIndex="1" runat="server" NumberFormat-DecimalDigits="0" NumberFormat-GroupSeparator="" MaxLength="4" Type="Number" MinValue="2000" MaxValue="2200"></telerik:RadNumericTextBox>
                            </asp:TableCell>
                            <asp:TableCell CssClass="columna1">
                                <telerik:RadComboBox ID="cbTipoProyecto" runat="server" TabIndex="2">
                                    <Items>
                                        <telerik:RadComboBoxItem Text="Ensayos" Value="1" />
                                        <telerik:RadComboBoxItem Text="Estudios" Value="2" />
                                        <telerik:RadComboBoxItem Text="Capacitación" Value="3" />
                                        <telerik:RadComboBoxItem Text="Otros" Value="4" /> </Items>
                                </telerik:RadComboBox>
                            </asp:TableCell>
                            <asp:TableCell CssClass="columna1">
                                <telerik:RadComboBox ID="cbPaises" runat="server" TabIndex="4" Width="80%"> </telerik:RadComboBox>
                            </asp:TableCell>
                            <asp:TableCell CssClass="columna3">
                                <telerik:RadButton ID="btnBuscar" TabIndex="4" runat="server" AutoPostBack="true" Text="Buscar" ToolTip="Buscar antecedentes entre años" OnClick="btnCalcular_Click">
                                    <Icon PrimaryIconUrl="~/UI/Imagenes/buscar.png" PrimaryIconWidth="21px" PrimaryIconHeight="25px" PrimaryIconTop="3px" PrimaryIconLeft="5px" /> </telerik:RadButton>
                            </asp:TableCell>
                        </asp:TableRow>
                    </asp:Table>
                </asp:Panel>
                <asp:Panel runat="server" GroupingText="Antecedentes" Style="display: none" ID="pnlValores" ScrollBars="Auto" CssClass="pnlValores" Height="85%">
                    <asp:ImageButton ID="btnImprimir" OnClientClick="Imprimir()" runat="server" ToolTip="Imprimir Pantalla" ImageUrl="~/UI/Imagenes/impresora.png"></asp:ImageButton>
                    <asp:ImageButton ID="btnExportToXLS" runat="server" ToolTip="Exportar a Excel" ImageUrl="~/UI/Imagenes/iconoxls.png" OnClick="btnExportToXLS_Click"></asp:ImageButton>
                    <telerik:RadGrid ID="grillaListado" runat="server" AllowPaging="false" AllowSorting="true" AutoGenerateColumns="false" EnableLinqExpressions="false"   >
                        <MasterTableView Caption="Antecedentes" UseAllDataFields="true">
                            <Columns>
                                <telerik:GridBoundColumn DataField="numeroOC" HeaderText="Número OC" ItemStyle-Width="10%"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="empresa" HeaderText="Empresa OC" ItemStyle-Width="15%"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="codigoEE" HeaderText="Codigo EE" ItemStyle-Width="8%"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="fecha" HeaderText="Fecha OC" DataType="System.DateTime" DataFormatString="{0:dd/MM/yy}" ItemStyle-Width="8%"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="titulo" HeaderText="Título Proyecto" ItemStyle-Width="39%"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="pais" HeaderText="País Proyecto" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Left"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="moneda" HeaderText="Moneda" ItemStyle-Width="3%" ItemStyle-HorizontalAlign="Center"></telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="total" HeaderText="Total" ItemStyle-Width="8%" ItemStyle-HorizontalAlign="Right"></telerik:GridBoundColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </asp:Panel>
            </div>
            <telerik:RadCodeBlock ID="indexBlockCode" runat="server">
                <script type="text/javascript">
                    loadCSS("/UI/Estilos/ControlesUsuarios/listados.css");

                    function Imprimir() {
                        var radGrid = $find('<%= grillaListado.ClientID %>');
                        radGrid.MasterTableView.get_element().style.fontSize = "10px";
                        var anioDesde = $find('<%= ntxtAnioDesde.ClientID %>').get_value();
                        var anioHasta = $find('<%= ntxtAnioHasta.ClientID %>').get_value();
                        var tproyecto = $find('<%= cbTipoProyecto.ClientID %>').get_selectedItem().get_text();
                        var pais = $find('<%= cbPaises.ClientID %>').get_selectedItem().get_text();
                        var previewWnd = window.open('about:blank', 'Antecedentes', '', false);
                        var styleStr = "<html><head><title>Antecedentes</title></head>";
                        var htmlcontent = styleStr +"<body> <label style='font-size:10px'>Año desde:" + anioDesde + " - hasta " + anioHasta + " Tipo de Proyecto: " + tproyecto + " País: " + pais + "</label><br/>" + radGrid.get_element().outerHTML + "</body></html>";
                        previewWnd.document.open();
                        previewWnd.document.write(htmlcontent);
                        previewWnd.document.close();
                        previewWnd.print();
                        previewWnd.close();
                    }
                </script>
            </telerik:RadCodeBlock>
        </asp:Content>

C#:
      protected void Page_Load(object sender, EventArgs e)
        {
          
            Inicializar(); if (!Page.IsPostBack)
            { Fcombos.CargaPaises(cbPaises); cbPaises.Items.Insert(0, new Telerik.Web.UI.RadComboBoxItem("-- Todos los países ---", "0"));
              ntxtAnioHasta.Value = DateTime.Now.Year; ntxtAnioDesde.Value = DateTime.Now.AddYears(-1).Year; 
            }
            
        }
        private void Inicializar()
        { _notificacion = (((EstudiosElectricos)this.Master).ObtenerControlNotificacion()); }
        protected void btnCalcular_Click(object sender, EventArgs e)
        {
            DateTime comenzo = DateTime.Now;
            LlenaGrilla();
            ((EstudiosElectricos)this.Master).tiempoTotal = String.Format("{0:0.00}", (DateTime.Now.Subtract(comenzo)).TotalSeconds) + " Segs";
        }
        private void LlenaGrilla()
        {
            Page.Validate("filtro"); if (!Page.IsValid) { grillaListado.DataSource = null; return; }  pnlValores.Style.Add("display", "block"); List<eeConsultas.eeAntecedentes> lValores = eeConsultas.eeAntecedentes.BuscarProyectos((int)ntxtAnioDesde.Value, (int)ntxtAnioHasta.Value, (short)Convert.ToInt16(cbTipoProyecto.SelectedValue), (short)Convert.ToInt16(cbPaises.SelectedValue)); grillaListado.DataSource = lValores; grillaListado.DataBind();
        }
        protected void btnLimpiar_Click(object sender, EventArgs e)
        { cbPaises.Items.Clear(); Fcombos.CargaPaises(cbPaises); pnlValores.Style.Add("display", "none"); btnExportToXLS.Style.Add("display", "none"); grillaListado.DataSource = null; }
        protected void btnExportToXLS_Click(object sender, ImageClickEventArgs e)
        {
            try
            {

                grillaListado.MasterTableView.Caption = "    Antecedentes  " + Environment.NewLine + "Año Desde - Hasta: " + ntxtAnioDesde.Value.ToString() + "-" +
                      ntxtAnioHasta.Value.ToString() + " Tipo de Proyecto: " + cbTipoProyecto.Text + "  País: " + cbPaises.Text;
                grillaListado.ExportSettings.Excel.Format = GridExcelExportFormat.Biff; grillaListado.ExportSettings.IgnorePaging = true; 
                grillaListado.ExportSettings.ExportOnlyData = true; grillaListado.ExportSettings.OpenInNewWindow = true;
                grillaListado.ExportSettings.FileName = "Antecedentes"; 
                grillaListado.MasterTableView.ExportToExcel();
            }
            catch (Exception ex)
            {
                throw new Exception(ex.Message);
            }
        }


Can you help me?







Bill Wolff
Top achievements
Rank 1
 answered on 14 Jan 2015
4 answers
110 views
Our web application has an aspx page that uses RadTreeView ( wrapper class  xcTreeView inherits RadTreeView) and RadTreeViewContextMenu for the context menus. The tree is built with all its nodes and associated context menus on each node.  The RadTreeView defines an event handler for onnodeexpand="trMenu_TreeNodePopulate".  When a user selects a node to expand, the event handler code behind determines if the node has permission to expand.  If this node is not permitted to expand, then I want to disable the right click context menus on that node. I've tried node.EnableContextMenu=false, but that doesn't seem to have any effect. What am I doing wrong? 

Here's some code snippets:

aspx.cs:
protected void trMenu_TreeNodePopulate(object sender, RadTreeNodeEventArgs e)
        {
             RadTreeNode node = e.Node;
             if (!treenav.PopulateNodefromXML(sender, node))
             {
                 e.node.EnableContextMenu = false;
             }
         }
 aspx:
<cc2:xcTreeView ID="trMenu"  runat="server" CssClass="TreeView" PersistLoadOnDemandNodes="true"
    NodeIndent="15" OnClientNodeClicking="onNodeClicking" OnClientMouseOver="ClientMouseOver"
    onnodeexpand="trMenu_TreeNodePopulate" ShowLines="True" Style="border-top-style: none;
    border-right-style: none; border-left-style: none; border-bottom-style: none;"  Skin="Outlook"   Font-Names="'Asap',Tahoma"   MultipleSelect="true"
    Width="99%" meta:resourcekey="trMenuResource1" SingleExpandPath="false" OnContextMenuItemClick="tree_ContextClicked" onClientContextMenuShown="ClientContextMenuShown" 
    OnClientContextMenuShowing="ClientContextMenuShowing">
    <ContextMenus>
        <telerik:RadTreeViewContextMenu Skin="Outlook" ID="EmptyMenu" runat="server" Width="30px"  >
            <Items>
            <telerik:RadMenuItem   IsSeparator="true"></telerik:RadMenuItem>
            </Items>
        </telerik:RadTreeViewContextMenu>
        <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="FARMCMenu"   runat="server" Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                             
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
            <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="WAPCMenu" runat="server"  Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                            
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
            <telerik:RadTreeViewContextMenu Skin="Outlook"  Font-Size="10pt" ID="SITECMenu" runat="server"  Font-Names="'Asap',Tahoma">
            <Items>
            </Items>
                                                               
                <CollapseAnimation Type="None" />
        </telerik:RadTreeViewContextMenu>
    </ContextMenus>
                                                     
</cc2:xcTreeView>

Betty
Top achievements
Rank 1
 answered on 14 Jan 2015
2 answers
98 views
Hi

Looking for some advice on how / where you save the recurrence rules, and the exceptions IE when you edit 'this occurrence'  rather than series.

Ideally I'd like these in a database, so I can search not only for appointments but clear slots also.

Andy
Boyan Dimitrov
Telerik team
 answered on 14 Jan 2015
1 answer
43 views
(Not sure which forum this belongs in.)

I have an app which has Telerik Asp.Net references in all pages including the master pages.
In my master page I have the usual RadScriptManager references to the Telerik jQuery js files.

I have a start up routine that references an HTML input control (not an ASP.Net control, just <input type="button"... etc.  although it has runat='server')

The JavaScript function itself is as follows:
   $(document).ready(function () {                                                                
        var hf = "<%= hfStartTimer.Value %>";
        timeoutButton = $get('btnTimeout');
        timeoutButton.style.visibility = 'hidden';
        if (hf == 'true') {                           
            timerHandle = setTimeout(function () {                             
            startCounter();
         }, "<%= hfTimeOut.Value %>");
      }
   })

The problem is that this works perfectly in Chrome and Firefox but not in IE10 or 11.  It crashes.  The $get returns null for btnTimeout.

Suggestions?
 
Boris
Top achievements
Rank 1
 answered on 14 Jan 2015
1 answer
197 views
Hi,

I have a problem with the RadGrid and the create/update popup.

The radgrid is in a modal dialog (call with javascript showModalDialog).  

<telerik:RadGrid ID="grdExternalCosts" runat="server" AllowPaging="True" ShowFooter="true" AllowSorting="True" AutoGenerateColumns="False" ShowStatusBar="true" OnPreRender="grdExternalCosts_PreRender" OnNeedDataSource="grdExternalCosts_NeedDataSource" OnUpdateCommand="grdExternalCosts_UpdateCommand" OnInsertCommand="grdExternalCosts_InsertCommand" DeleteCommand="grdExternalCosts_DeleteCommand">
<MasterTableView Width="100%" CommandItemDisplay="Top" DataKeyNames="ExternalCostID" EditMode="PopUp">
   <EditFormSettings>
     <PopUpSettings Modal="false" ZIndex="500" />
   </EditFormSettings>
   <Columns>
   ...
  </Columns>
   <EditFormSettings UserControlName="ExternalCostsDetail.ascx" EditFormType="WebUserControl">
      <EditColumn UniqueName="EditCommandColumn1"></EditColumn>
   </EditFormSettings>
</MasterTableView>
</telerik:RadGrid>

The modal screen is showing nicely but when I click the add new record button, I get an error saying 'the session has expired. The window will be closed. Refresh the main page before continuing'.  And when I look at the hyperlink it is the same as the page that I have in the modal dialog, not the user control for inserting a new record. 

What can I do to fix this?

Kind regards

Suzy 
Konstantin Dikov
Telerik team
 answered on 14 Jan 2015
2 answers
99 views
Hi,

I'm facing very odd behavior with RadGrid and WebForms MVP. Long story short is that during paging ObjectDatasource calls for Select method twice. 

I compared it with standard ASP GridView and it works well, just a single call. Can please somebody tell me a secret - why is that happening?

I'm attaching an example website solution with examples of RadGrid (radgrid.aspx) and GridView (AspGridView.aspx), both userControls have the same codeBehind, difference is only in grid (radGrid or GridView). Just put a breakpoint on Select method, and you will notice that every time you change the page in Telerik's grid, datasource is being asked twice.

https://drive.google.com/file/d/0B3Da7JHcNzvcNGdrU2lna3BFYUE/view?usp=sharing

Thank you
Vasil
Telerik team
 answered on 14 Jan 2015
Narrow your results
Selected tags
Tags
+? more
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Will
Top achievements
Rank 2
Iron
Motti
Top achievements
Rank 1
Iron
Hester
Top achievements
Rank 1
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Thomas
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?