Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
197 views
How to resize image on AsyncUpload?
I want to specify a maximum width (Constrain Proportions) when uploading a picture.
If the picture I upload is 1800px wide, I want to be saved as a maximum of 600 px wide.
Tips on how I solve it. I am using the "AsyncUpload - Validation" example....
Shinu
Top achievements
Rank 2
 answered on 08 Jul 2014
8 answers
251 views
I have a Radgrid which is part of a popup window. the popup window has a panel which has an update panel to which the radgrid is added. The refresh and delete do not work here because the RadGrid1_ItemCommand is never invoked! Whereas if I add the same control, without the popup it works fine.
Princy
Top achievements
Rank 2
 answered on 08 Jul 2014
3 answers
557 views
Hello,

My requirement is to refresh ajaxified grid's data based on some conditions from client side using jquery.
As a temporary solution, I have written following jquery code:

$("a.rgCurrentPage").each(function () {
                    $(this).removeAttr("onclick");
                    $(this)[0].click();
                });

Is telerik provided any client side function to trigger radgrid's pager number's click event using javascript ?

thank you in advance
Gafoor.
Princy
Top achievements
Rank 2
 answered on 08 Jul 2014
1 answer
264 views
Hi there,

I have two RadAsyncUpload and a RadProgressArea on the same page, but I want the RadProgressArea to show only when the user uploading files using the first RadAsyncUpload, and hide the RadProgressArea when the user uploading through the second RadAsyncUpload. Currently, the RadProgressArea shows on both. Is there any way to hide the RadProgressArea using javascript? Any help is much appreciated.
Shinu
Top achievements
Rank 2
 answered on 08 Jul 2014
5 answers
588 views
Want to get the tooltip of a current selected item in radcombobox
sandeep
Top achievements
Rank 1
 answered on 07 Jul 2014
4 answers
201 views
I am setting a target for the radbutton.  This was working fine with my last build from Q1.  With the latest Q2 build, it appears to be ignoring the Target setting to open the link in the parent window. Instead, it navigates to the new page within the existing window.  Did something change here?


<telerik:RadButton ID="testButton" runat="server" NavigateUrl="~/newPage" Text="Setup" Target="_parent" Skin="MetroTouch" ButtonType="LinkButton" AutoPostBack="false" />
Dobromir
Telerik team
 answered on 07 Jul 2014
1 answer
291 views
Hi,
I'm using UI for ASP.NET AJAX Q2 2014  2014.2.618.45 let me describe my problem:
I'm using a RadGrid with FormTemplate and 2 buttons, one for Insert or Update (I'm usig CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>') and one for Cancel; If I'm in insert mode and if  I press the TAB key to select the Save button and then I press the Enter Key, it is working fine but, when I'm in Update mode  and if  I press the TAB key to select the Save button and then I press the Enter Key, the Update button events never fires. It's is happening only for the Save button becouse if I select the Cancel button works fine.

I´m attaching my aspx code  for a better idea of what I'm describing

I hope you can help me.

Regards,
José Zamarrón

<%@ Page Title="" Language="C#" MasterPageFile="~/masterSRR.Master" AutoEventWireup="true" CodeBehind="rancho.aspx.cs" Inherits="SRRUI2.Catalogos.rancho" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
 
 
<asp:Content ID="Content1" ContentPlaceHolderID="cphScriptsCss" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cphFiltros" runat="Server">
    <table style="width: 100%">
        <tr>
            <td rowspan="3">
                <asp:Panel ID="Panel5" runat="server" BackColor="Transparent" Style="float: left;">
                    <asp:Image ID="Image1" ImageUrl="~/Imagenes/titulo-ranchos.png"
                        runat="server" />
                </asp:Panel>
            </td>
            <td colspan="5" style="text-align: right"></td>
        </tr>
        <tr>
            <td></td>
            <td></td>
            <td></td>
            <td></td>
        </tr>
        <tr>
           
            <td></td>
            <td style="text-align: left; width: 210px">
            
                 <asp:Label ID="lblFitrarActivo" runat="server" Text="FILTRAR POR:" CssClass="MyLabel"></asp:Label><br />
                <telerik:RadComboBox ID="cmbFiltroActivo" runat="server" Skin="Windows7">
                    <Items>
                        <telerik:RadComboBoxItem Text="TODOS" Value="-1" />
                        <telerik:RadComboBoxItem Text="ACTIVO" Value="1" Selected="true" />
                        <telerik:RadComboBoxItem Text="INACTIVO" Value="0" />
                    </Items>
                </telerik:RadComboBox>
            </td>
            <td style="text-align: left; width: 210px">
            
                 <asp:Label ID="lblBusqueda" runat="server" Text="BÚSQUEDA:" CssClass="MyLabel"></asp:Label><br />
                 <telerik:RadSearchBox runat="server" ID="rdsFiltro"  onKeyPress="return EvitaCaracteres(event)" onpaste="return false"
                    CssClass="MyWrapper" Skin="Windows7" Width="210" DropDownSettings-Height="300"
                    DataTextField="nombre" EmptyMessage="NOMBRE"  EnableAutoComplete="false"
                    Filter="Contains" OnSearch="rdsFiltro_Search">
                 </telerik:RadSearchBox>
        
            </td>
        </tr>
    </table>
</asp:Content>
    
<asp:Content ID="Content3" ContentPlaceHolderID="cphContenido" runat="server">
    <div>           
        <telerik:RadAjaxPanel runat="server" ID="rApnl" Width="100%" ClientEvents-OnRequestStart="onRequestStart" LoadingPanelID="radLoaginPlanel" Culture="es-MX" >
 
        <telerik:RadGrid ID="gridRancho" runat="server" AllowPaging="true" Skin="Windows7" AllowSorting="true" Culture="es-MX"
                            OnNeedDataSource="gridRancho_NeedDataSource"
                            OnDeleteCommand="gridRancho_DeleteCommand"
                            OnInsertCommand="gridRancho_InsertCommand"
                            OnUnload="gridRancho_Unload"
                            OnUpdateCommand="gridRancho_UpdateCommand"
                            OnItemCommand="gridRancho_ItemCommand"
                            OnItemDataBound="gridRancho_ItemDataBound" OnItemCreated="gridRancho_ItemCreated">
 
                            <MasterTableView CommandItemDisplay="Top" AutoGenerateColumns="false" DataKeyNames="id_rancho"
                                InsertItemPageIndexAction="ShowItemOnCurrentPage">
                                <PagerStyle Mode="NextPrevAndNumeric" PagerTextFormat="{4} Registro {2} a {3} de {5}" PageSizeLabelText="Tamaño por página" />
                                <NoRecordsTemplate>
                                    <table width="100%" border="0">
                                        <tr>
                                            <td align="center">
                                                <h3 style="color: Red">NO SE ENCONTRÓ INFORMACIÓN</h3>
                                            </td>
                                        </tr>
                                    </table>
                                </NoRecordsTemplate>
                                <Columns>
                                    <telerik:GridBoundColumn DataField="id_rancho" UniqueName="id_rancho" HeaderText="ID"  Visible="false" ReadOnly="True">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="nombre" UniqueName="nombre" HeaderText="NOMBRE">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="propietario" UniqueName="propietario" HeaderText="PROPIETARIO">
                                    </telerik:GridBoundColumn>
                                     <telerik:GridBoundColumn DataField="zona" UniqueName="zona" HeaderText="IdZona" Visible="false">
                                    </telerik:GridBoundColumn>
                                     <telerik:GridBoundColumn DataField="descZona" UniqueName="descZona" HeaderText="ZONA">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridBoundColumn DataField="activo" UniqueName="activo" HeaderText="Activo" Visible="false">
                                    </telerik:GridBoundColumn>
                                    <telerik:GridEditCommandColumn ButtonType="ImageButton" HeaderText="EDITAR" UpdateImageUrl="~/Imagenes/editar.png" Exportable="false" UniqueName="EditColumn"></telerik:GridEditCommandColumn>
                                    <telerik:GridButtonColumn ConfirmText="¿ESTÁ SEGURO QUE DESEA ELIMINAR EL RANCHO SELECCIONADO?" ButtonType="ImageButton" Exportable="false" ButtonCssClass="item_permisos" ImageUrl="~/Imagenes/eliminarRegistro.png" 
                                        CommandName="Delete" Text="Eliminar" UniqueName="DeleteColumn" HeaderText="ELIMINAR">
                                    </telerik:GridButtonColumn>
                                </Columns>
                                <EditFormSettings InsertCaption="Agregar Nuevo Rancho" CaptionFormatString="Esta editando el rancho con ID: {0}" CaptionDataField="id_rancho" EditFormType="Template">
                                    <EditColumn FilterControlAltText="Filter EditCommandColumn1 column" UniqueName="EditCommandColumn1">
                                    </EditColumn>
                                    <FormTemplate>
                                      <table class="medio">
                                           <tr>
                                               <td class="celdaNameTamanio">
                                                        NOMBRE:
                                               </td>
                                               <td class="celdaDatosTamanio">  
                                                   <telerik:RadTextBox ID="txtNombre" Width="250" Skin="Windows7" MaxLength="60" CssClass="upper" onpaste="return false" onKeyPress="return EvitaCaracteres(event)" onKeyUp="changeCase(this)" runat="server"
                                                        EmptyMessage="" Text='<%# Bind("nombre") %>'>
                                                   </telerik:RadTextBox>
                                                   <asp:RequiredFieldValidator ID="rfvTxtNombre" ForeColor="Red" runat="server" ErrorMessage='<%#SRRUI2.Helpers.ModalView.MensajeCampoRequerido %>' Display="Dynamic" ControlToValidate="txtNombre"></asp:RequiredFieldValidator>
                                               </td>
                                           </tr>
                                          <tr>
                                              <td class="celdaNameTamanio">
                                                  PROPIETARIO:
                                              </td>
                                              <td class="celdaDatosTamanio">   <telerik:RadTextBox ID="txtPropietario" Width="250" Skin="Windows7" MaxLength="60" CssClass="upper" onpaste="return false" onKeyUp="changeCase(this)" onKeyPress="return EvitaCaracteres(event)" runat="server"
                                                        EmptyMessage="" Text='<%# Bind("propietario") %>'>
                                                    </telerik:RadTextBox>
                                              </td>
                                          </tr>
                                          <tr>
                                              <td class="celdaNameTamanio">
                                                  ZONA:
                                              </td>
                                              <td class="celdaDatosTamanio">  
                                                    <telerik:RadComboBox ID="cmbZona" Width="250" runat="server" Skin="Windows7" SelectedValue='<%# Bind("zona") %>' AppendDataBoundItems="True">
                                                        <Items>
                                                            <telerik:RadComboBoxItem Text="CENTRO" Value="1" />
                                                            <telerik:RadComboBoxItem Text="SUR" Value="2" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                              </td>
                                          </tr>
                                          <tr>
                                              <td class="celdaNameTamanio">
                                                  ESTADO:
                                              </td>
                                              <td class="celdaDatosTamanio"> 
                                                    <telerik:RadComboBox ID="cmbActivo" Width="250" runat="server" Skin="Windows7" SelectedValue='<%# Bind("activo") %>' AppendDataBoundItems="True">
                                                        <Items>
                                                            <telerik:RadComboBoxItem Text="ACTIVO" Value="1" />
                                                            <telerik:RadComboBoxItem Text="INACTIVO" Value="0" />
                                                        </Items>
                                                    </telerik:RadComboBox>
                                              </td>
 
                                          </tr>
                                            <tr>
                                                <td style="text-align: right; width: 50%"></td>
                                                <td style="text-align: left">
 
                                                  <telerik:RadButton ID="bntGuardar" runat="server" Text="Guardar" Skin="Windows7"
                                                        CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'>
                                                        <Icon SecondaryIconCssClass="rbSave" SecondaryIconRight="4" SecondaryIconTop="4"></Icon>
                                                    </telerik:RadButton>   
                                                      
                                                            <telerik:RadButton ID="bntCancelar" runat="server" Text="Cancelar" Skin="Windows7" CausesValidation="False"
                                                                CommandName="Cancel">
                                                                <Icon SecondaryIconCssClass="rbCancel" SecondaryIconRight="4" SecondaryIconTop="4"></Icon>
                                                            </telerik:RadButton>
                                                </td>
                                                </tr>
 
                                       </table>
                                    </FormTemplate>
                                </EditFormSettings>
                                <ExpandCollapseColumn Visible="False">
                                    <HeaderStyle Width="19px"></HeaderStyle>
                                </ExpandCollapseColumn>
                                <CommandItemSettings AddNewRecordText="Agregar Nuevo Rancho" ShowExportToExcelButton="true" />
                                <RowIndicatorColumn Visible="False">
                                    <HeaderStyle Width="20px" />
                                </RowIndicatorColumn>
                            </MasterTableView>
                            <ExportSettings ExportOnlyData="True" FileName="RANCHO"  IgnorePaging="True">
                            </ExportSettings>
                            <ClientSettings>
                                <Selecting AllowRowSelect="true" />
                            </ClientSettings>
                        </telerik:RadGrid>
                    <asp:Button runat="server" ID="hiddenTargetControlForModalPopup" Style="display: none;" />
                    <asp:ModalPopupExtender ID="programmaticModalPopup" runat="server" BehaviorID="programmaticModalPopupBehavior"
                        TargetControlID="hiddenTargetControlForModalPopup" PopupControlID="programmaticPopup"
                        BackgroundCssClass="modalBackground" RepositionMode="RepositionOnWindowScroll"
                        OkControlID="bntok">
                    </asp:ModalPopupExtender>
 
                    <asp:Panel runat="server" CssClass="modalPopupatencion" ID="programmaticPopup" Style="width: 388px; height: 215px; text-align: center; color: white">
                        <asp:Panel runat="Server" ID="programmaticPopupDragHandle" Style="cursor: move; height: 45px; text-align: center;"
                            Height="42px">
                            <br />
                            Aviso del Sistema
                        </asp:Panel>
                        <table>
                            <tr>
                                <td style="width: 130px; height: 133px;">   
                                </td>
                                <td style="height: 133px">
                                    <asp:Label ID="lblmsg" CssClass="mensaje" runat="server"></asp:Label>
                                        
                                </td>
                            </tr>
                            <tr>
                                <td colspan="2">
                                    <asp:ImageButton ID="bntok" runat="server" CausesValidation="false" ImageUrl="~/Imagenes/boton-aceptarI.png" />
                                </td>
                            </tr>
                        </table>
                    </asp:Panel>
 
               </telerik:RadAjaxPanel>
         
                    <telerik:RadAjaxLoadingPanel ID="radLoaginPlanel" IsSticky="true" runat="server" Skin="" Transparency="30">
                        <div id="loading">
                            <div>
                                <p>
                                    Cargando
                                </p>
                                <span>Espere Por favor, se esta procesando su solicitud...</span>
                            </div>
                        </div>
                    </telerik:RadAjaxLoadingPanel>
 
    </div>
    <script type="text/javascript">
        function onRequestStart(sender, args) {
            if (args.get_eventTarget().indexOf("ExportTo") >= 0) {
                args.set_enableAjax(false);
            }
        }
    </script>
</asp:Content>

Dobromir
Telerik team
 answered on 07 Jul 2014
3 answers
121 views
We are using RadEditor version 2012.3.1016 and have the following issue in Internet Explorer 9.

  1. Enter an email address in the editor (eg. "info@example.com")
  2. Select the email address and open the LinkManager
  3. The Email tab is active and "info@example.com" is prefilled for both the address and the text
  4. Enter something in the subject field (eg. "test")
  5. Click OK
  6. Watch the HTML source. The subject is not added to the mailto-link

Now try this:

  1. Enter a random word in the editor (eg "test")
  2. Select the word and open the LinkManager
  3. Click on the Email tab
  4. Enter "info@example.com" in the address field
  5. Enter "something" in the subject field
  6. Watch the HTML source. The subject is added to the mailto-link

So adding a subject to a mailto-link works fine as long as the text of the link isn't an email address as well. The demo editor at http://demos.telerik.com/aspnet-ajax/editor/examples/overview/defaultcs.aspx has the same problem.
Vessy
Telerik team
 answered on 07 Jul 2014
3 answers
199 views

I have some oddities in the RecurrenceEditor retaining it's selected values.

The editor is part of a templated edit form. On that form, there is a control that causes postback. There are a couple instances in which certain items on the RecurrenceEditor are reset on postback.

In my examples, () denote items the user selects. If it remains in the second part of my scenario, the selected item stays selected. Otherwise, I will state to what it resets.

Yearly - Every (Month)(Day), resets to Every January 1
Monthly - Day (Day) of every (#) Months, resets to Day 1 of every (#) Months

In all other scenarios, the selected items remain correctly selected.

Thanks,
Kerry Wano

 

Plamen
Telerik team
 answered on 07 Jul 2014
4 answers
140 views
I have this grid filter that stopped working.  I have about 6-10 of these filters on the grid and just this one stopped working.  Any suggestions??

<telerik:GridBoundColumn DataField="AssignedTo"
            FilterControlAltText="Filter AssignedTo column" HeaderText="AssignedTo"
            SortExpression="AssignedTo" UniqueName="AssignedTo">
 
 
            <FilterTemplate>
                <telerik:RadComboBox ID="RadComboBoxAssignedTo" DataSourceID="SqlDataSource4" DataTextField="UserName"
                    DataValueField="UserName" Height="150px" Width="100px" AppendDataBoundItems="true" SelectedValue='<%# TryCast(Container,GridItem).OwnerTableView.GetColumn("AssignedTo").CurrentFilterValue %>'
                    runat="server" OnClientSelectedIndexChanged="AssignedToIndexChanged">
                    <Items>
                        <telerik:RadComboBoxItem Text="All" />
                    </Items>
                </telerik:RadComboBox>
                <telerik:RadScriptBlock ID="RadScriptBlock3" runat="server">
 
                    <script type="text/javascript">
                        function AssignedToIndexChanged(sender, args) {
                            var tableView = $find("<%# TryCast(Container,GridItem).OwnerTableView.ClientID %>");
                            tableView.filter("AssignedTo", args.get_item().get_value(), "EqualTo");
                        }
                    </script>
 
                </telerik:RadScriptBlock>
            </FilterTemplate>
 
        </telerik:GridBoundColumn>


Here is the error I am getting.

Server Error in '/' Application.Selection out of range
Parameter name: value Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.ArgumentOutOfRangeException: Selection out of range
Parameter name: value

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:

[ArgumentOutOfRangeException: Selection out of range
Parameter name: value]
Telerik.Web.UI.RadComboBox.PerformDataBinding(IEnumerable dataSource) +191
Telerik.Web.UI.RadComboBox.OnDataSourceViewSelectCallback(IEnumerable data) +510
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
Telerik.Web.UI.RadComboBox.OnDataBinding(EventArgs e) +1298
Telerik.Web.UI.RadComboBox.PerformSelect() +37
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
Telerik.Web.UI.RadComboBox.DataBind() +70
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
System.Web.UI.Control.DataBindChildren() +187
System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +94
System.Web.UI.Control.DataBind() +15
Telerik.Web.UI.GridItem.SetupItem(Boolean dataBind, Object dataItem, GridColumn[] columns, ControlCollection rows) +1304
Telerik.Web.UI.GridTableView.CreateFilteringItem(Boolean useDataSource, GridColumn[] copiedColumnSet, GridTHead thead) +167
Telerik.Web.UI.GridTableView.CreateControlHierarchy(Boolean useDataSource) +3070
Telerik.Web.UI.GridTableView.CreateChildControls(IEnumerable dataSource, Boolean useDataSource) +1147
System.Web.UI.WebControls.CompositeDataBoundControl.PerformDataBinding(IEnumerable data) +67
System.Web.UI.WebControls.DataBoundControl.OnDataSourceViewSelectCallback(IEnumerable data) +123
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +33
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +138
Telerik.Web.UI.GridTableView.PerformSelect() +38
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +30
Telerik.Web.UI.GridTableView.DataBind() +642
Telerik.Web.UI.GridTableView.Rebind() +117
Telerik.Web.UI.GridFilterCommandEventArgs.ExecuteCommand(Object source) +1237
Telerik.Web.UI.RadGrid.OnBubbleEvent(Object source, EventArgs e) +205
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +71
System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +37
Telerik.Web.UI.GridItem.OnBubbleEvent(Object source, EventArgs e) +147
Telerik.Web.UI.GridItem.FireCommandEvent(String commandName, Object commandArgument) +88
Telerik.Web.UI.RadGrid.RaisePostBackEvent(String eventArgument) +12648
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +9528682
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1724
Ryan
Top achievements
Rank 1
 answered on 07 Jul 2014
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?