Telerik Forums
UI for ASP.NET AJAX Forum
8 answers
259 views
Hey,

I have a RadTreeView inside a RadPane.  The RadPane has Scrolling="Y" and when the RadTreeView expands beyond the height of the Pane a scroll bar appears in the Pane and everything works great.  However, when the user checks/unchecks items in the TreeView there is an Ajax postback so I can display / hide information in other controls based on the selected items.  I have the TreeView as the AjaxControlID in an AjaxSetting as well as an AjaxUpdatedControl with the LoadingPanelID set. Like so:
<telerik:AjaxSetting AjaxControlID="tvwTermZone">
    <UpdatedControls>
        <telerik:AjaxUpdatedControl ControlID="tvwTermZone" LoadingPanelID="lPnlMain" />
    </UpdatedControls>
</telerik:AjaxSetting>

When the TreeView extends beyond the bottom of the RadPane the LoadingPanel is displayed over it's expanded size beyond the bottom of the scrolled RadPane, so that it shows over the cotrols that are in the RadPane below the Pane that contains the TreeView in it and the 'waiting' gif shows outside of the containing RadPane as well.  Is there any way to keep the LoadingPanel over the RadPane that holds the TreeView?

Thanks in Advance
Dave
Dave
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
111 views
Hi,
I  have a radlist view in which I'm doing Manual Updates. I would like to be able to use the ItemUpdated Event and just set KeepInEditMode to true. Unfortunately I discovered this event isn't fired if you are using Manual Updates. How else could I achieve this so as soon as item is updated it's thrown back into edit mode?

thanks

Karl
Karl
Top achievements
Rank 1
 answered on 03 Jul 2012
2 answers
137 views
I am using the latest Telerik dlls and all my events are firing correctly in the code behind. When you add or delete a row in the grid it updates the datasource correctly and I can debug and see on the OnNeedDataSource that the correct datasource is being set with either the row added or deleted. But the client grid is still showing the row you deleted or not showing the row you added. I have tried it with a RadAjaxManager and a RadAjaxPanel and both don't update the grid correctly. When I do an edit it will update correctly. Here is the code aspx code.
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">
                    <telerik:RadGrid ID="dgStations" runat="server" PageSize="10" AllowPaging="true"
                        AutoGenerateColumns="false" OnInsertCommand="dgStationsOnInsertCommand" OnUpdateCommand="dgStationsOnUpdateCommand"
                        OnDeleteCommand="dgStationsOnDeleteCommand" OnNeedDataSource="dgStationsOnNeedDataSource">
                        <PagerStyle Mode="NextPrevAndNumeric" />
                        <MasterTableView DataKeyNames="StationId" CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage">
                            <Columns>
                                <telerik:GridBoundColumn DataField="Description" HeaderText="Description" SortExpression="Description">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ServerPort" HeaderText="Server Port" SortExpression="ServerPort">
                                </telerik:GridBoundColumn>
                                <telerik:GridEditCommandColumn ButtonType="LinkButton" UniqueName="EditCommandColumn"
                                    EditText="Edit">
                                </telerik:GridEditCommandColumn>
                                <telerik:GridButtonColumn ConfirmText="Delete this station?" ConfirmDialogType="Classic"
                                    ButtonType="LinkButton" CommandName="Delete" Text="Delete" UniqueName="DeleteColumn">
                                </telerik:GridButtonColumn>
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </telerik:RadAjaxPanel>

Any idea why it isn't updating correctly?
Eric
Top achievements
Rank 1
 answered on 03 Jul 2012
0 answers
138 views
hi everybody
i have this error when i try to edit:

Procedure or function sp_c_comprasivamodificacion has too many arguments specified.

this is a simple sp for testing:

ALTER procedure [dbo].[sp_c_comprasivamodificacion]
 @fechaEmision as date, @id as int
AS

UPDATE       tbl_c_iva_compras
SET          fechaEmision = @fechaEmision where id=@id

and this is my my aspx:




 <telerik:RadGrid ID="RadGrid1" runat="server" Skin="Sunset" GridLines="None"
        AllowPaging="True" PageSize="15" AllowSorting="True" AutoGenerateColumns="False"
        ShowStatusBar="True" AllowAutomaticDeletes="True" AllowAutomaticInserts="True"
        AllowAutomaticUpdates="True" EnableLinqExpressions="False" DataSourceID="SqlDataSource1"
                        Width="1155px">
        
      
<MasterTableView CommandItemDisplay="Top"
                   DataKeyNames="id,NoCorrelativo,fechaEmision"         DataSourceID="SqlDataSource1" EditMode="EditForms" PageSize="10" >
<RowIndicatorColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</RowIndicatorColumn>

<ExpandCollapseColumn>
<HeaderStyle Width="20px"></HeaderStyle>
</ExpandCollapseColumn>
    <Columns>
       <telerik:GridBoundColumn DataField="cod_pfiscal" visible="false"
            HeaderText="cod_pfiscal" SortExpression="cod_pfiscal"
            UniqueName="cod_pfiscal" DataType="System.Int32">
           <HeaderStyle Width="5px" />
        </telerik:GridBoundColumn>
        <telerik:GridBoundColumn DataField="NoCorrelativo"
            HeaderText="No" SortExpression="NoCorrelativo"
            UniqueName="NoCorrelativo" DataType="System.Int32">
            <HeaderStyle Width="5px" />
        </telerik:GridBoundColumn>
    .
    .
    .
    .

        <telerik:GridEditCommandColumn CancelText="Cancelar" EditText="Editar"
            UpdateText="Modificar">
            <HeaderStyle Width="80px" />
            </telerik:GridEditCommandColumn>
    </Columns>
    <EditFormSettings  CaptionFormatString="Editar Factura: {0}" CaptionDataField="VGrLocales" EditFormType="Template" EditColumn-EditText="Editar" EditColumn-UpdateText="Modificar"  PopUpSettings-Modal="True">
<EditColumn UniqueName="EditCommandColumn1"></EditColumn>
   
     <FormTemplate>
    
                    <br /><br />
                    <div class="_100">
                    <div class="_25">
                       <div class="_100">
                       <div class="_50">
                       <label>Fecha:</label>
                            
                             <telerik:RadDatePicker RangeMinDate="1940/05/01" MinDate="1940/01/01" ID="fecha_emision" Runat="server"  Skin="Default" DbSelectedDate='<%# Bind("fechaEmision") %>'
                            EnableEmbeddedBaseStylesheet="False" Width="100">
                            <DateInput EnableEmbeddedBaseStylesheet="False">
                            </DateInput>
                        <Calendar UseRowHeadersAsSelectors="False" UseColumnHeadersAsSelectors="False"
                         ViewSelectorText="x" EnableEmbeddedBaseStylesheet="False"></Calendar>
                        <DatePopupButton ImageUrl="" HoverImageUrl=""></DatePopupButton>
                        </telerik:RadDatePicker>
                       </div>
                       <div class="_50">
                       <label>Numero</label>
                       <asp:TextBox ID="TextBox4" Width="50" runat="server" Text='<%# Bind( "numeroDoc" ) %>' > </asp:TextBox></center><center>
                       
                       </div>
                    
                       </div>
                               
                      </div>
                      <div class="_25">
                      
                       <label>Proveedor:</label>
     
                      <telerik:RadComboBox runat="server" ID="RadComboBox2" DataTextField="nombreProveedor" Skin="Simple"
                            DataValueField="nombreProveedor" DataSourceID="SqlDataSource2" SelectedValue='<%# Bind( "nombreProveedor") %>'  Width="210" Height="130">
                        </telerik:RadComboBox><br /><br />
                    
                      
                       </div>
                      <div class="_25">
                      <label>Gravadas:</label>
                            
                             <asp:TextBox ID="TextBox1" runat="server" MaxLength="10" Width="80" Text='<%# Bind( "CGInternas" ) %>'> </asp:TextBox>

                            
                       </div>
                       <div class="_25">
                       
                       <div class="_100">
                       <div class="_50">
                       
                                <asp:Button ID="Button1" Text='<%# Iif (TypeOf Container is GridEditFormInsertItem, "AGREGAR", "MODIFICAR") %>'
                                    runat="server" CommandName='<%# Iif (TypeOf Container is GridEditFormInsertItem, "PerformInsert", "Update") %>'>
                                </asp:Button>&nbsp;
                             
                           
                           </div>
                        <div class="_50">
              <asp:Button ID="Button2" Text="SALIR"  runat="server" CausesValidation="False" CommandName="Cancel" Width="100">
                                </asp:Button>
                               
                           </div>
                       
                       </div>
                       
                       
                       </div>
                       </div>
                           
                  
                </FormTemplate>




<PopUpSettings Modal="True" ZIndex="2500" Height="150px" Width="550px"></PopUpSettings>
    </EditFormSettings>
   
    <PagerStyle NextPageText="Siguiente" PrevPageText="Anterior" />
   
</MasterTableView>
        
         <ClientSettings>
            <ClientEvents OnRowDblClick="RowDblClick" />
         <ClientEvents OnPopUpShowing="PopUpCentered" />
        </ClientSettings>
    
                    </telerik:RadGrid>




 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConflictDetection="OverwriteChanges"
                        ConnectionString="<%$ ConnectionStrings:CONTASConnectionString %>"
                        SelectCommand="SELECT id, cod_pfiscal, NoCorrelativo, CONVERT (char(10), fechaEmision, 103) AS fechaEmision, cod_factura, numeroDoc, RTRIM(nrc) AS nrc, RTRIM(nombreProveedor) AS nombreProveedor, Total, FechaPago, FechaCancelado, CGInternas, CreditoFiscal, Retenc_13_SujetosNoDom, Retenc_13_SujetosExcl, Iva_Ant_a_Cta_Ret, Iva_Perc_2Tarjeta FROM tbl_c_iva_compras WHERE (cod_pfiscal = @cod_pfiscal) AND (tipodoc = 'CF') ORDER BY NoCorrelativo"
                                      
                        InsertCommand="sp_c_comprasiva"

       
                        InsertCommandType="StoredProcedure"
                        UpdateCommand="sp_c_comprasivamodificacion"
                        UpdateCommandType="StoredProcedure" >                                                                                  
                        <SelectParameters>
                            <asp:ControlParameter ControlID="cobperiodos" Name="cod_pfiscal"
                                PropertyName="SelectedValue" />
                        </SelectParameters>

                      
                        <UpdateParameters>
                            <asp:Parameter DbType="Date" Name="fechaEmision" />
                            <asp:Parameter Name="id" Type="Int32" />
                        </UpdateParameters>

                      
                        <InsertParameters>
      
                            <asp:Parameter Name="fechaEmision" />
                            <asp:Parameter Name="numeroDoc" />
                            <asp:Parameter Name="CGInternas" Type="Decimal" />
                            <asp:Parameter Name="nombreProveedor" />
      
                            <asp:ControlParameter ControlID="cobperiodos" Name="codpfiscal"
                                PropertyName="SelectedValue" />
                            <asp:sessionparameter Name="correlativo" sessionfield="correlativo" />
      
                            
                            <asp:ControlParameter ControlID="tipofactura" Name="tipo"
                                PropertyName="SelectedValue" />
                        </InsertParameters>
                     </asp:SqlDataSource>


i hope anyone can help me :(
Robert
Top achievements
Rank 2
 asked on 03 Jul 2012
1 answer
117 views

How to remove dynamically created checkbox

for (int j = 1; j <= i; j++)
{
    CheckBox chk = new CheckBox();
    chk.ID = "ChkBox" + j.ToString();
    pHolder.Controls.Remove(chk);
}

It's not removed


Thanks Advance,
New Gene.
Rumen
Telerik team
 answered on 03 Jul 2012
0 answers
79 views
Hi, need help with this error. By reading the fixed issues on past releases i found this one:  Fixed: Error when RadGrid left arrow is pressed in edit mode and keyboard navigation is enabled.

I'm using the Q2 2011 SP1 Release, and yes it is fixed, but the error came out when pressing the right arrow.

I dont know if this is a tracked issue, but i need a way to avoid the error in my website using this release.

I have an option to make it? Maybe disabling the left and right arrows?

Thanks for your help
Carlos
Top achievements
Rank 1
 asked on 03 Jul 2012
1 answer
347 views
Hi,
I am working on a intranet solution for our customers using Telerik Ajax toolkit.

During some debugging I figured out that the pages did a couple of requests to http://aspnet-scripts.telerikstatic.com/ajaxz... where it loads javascript files from.
I was shocked seeing outgoing connections, since the project is meant to work in a local LAN without internet access.
Disconnecting my network cable and reloading the page lead to a nonworking page.
My customers will use the web application in a sealed productivity environment where an internet connection will not be accepted nor possible in the most cases.

Requesting external script files from the internet turned telerik tools from brilliant to useless for the whole project.

Please tell me there is a way to circumvent these requests, and use local web resources instead.

Kind Regards
Timo



Rumen
Telerik team
 answered on 03 Jul 2012
2 answers
254 views
Update the radgrid on the client side, then open the radwindow.

Generates errors:

Uncaught Sys.WebForms.PageRequestManagerServerErrorException: Sys.WebForms.PageRequestManagerServerErrorException: Object reference not set to an instance of an object. Telerik.Web.UI.WebResource.axd:6 


Code C#:

using System;
 
public partial class MLDefault : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
    }
 
    protected void rgGrid_NeedDataSource(object sender, Telerik.Web.UI.GridNeedDataSourceEventArgs e)
    {
        if (!IsPostBack)
        {
            rgGrid.DataSource = new System.Data.DataTable();
            return;
        }
 
        var list = new[]{
            new{
                Description = "Text 1"
            },
            new{
                Description = "Text 2"
            }
        };
 
        rgGrid.DataSource = list;
    }
}


Code ASP.NET:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="MLDefault" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
 
    <script type="text/javascript">
        function OpenWindow() {
            $find('<%= rgGrid.ClientID%>').get_masterTableView().rebind();
            $find('<%= rwGrid.ClientID %>').show();
        }
    </script>
 
    <telerik:RadScriptManager ID="ScriptManager" runat="server" />
    <telerik:RadAjaxManager ID="RadAjaxManager" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgGrid" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <input type="button" value="Search" onclick="javascript:OpenWindow();" />
    <telerik:RadWindowManager ID="RadWindowManager" runat="server" EnableShadow="True"
        Behaviors="None" InitialBehaviors="None" ShowContentDuringLoad="False" VisibleStatusbar="False"
        Modal="true" RestrictionZoneID="aspnetForm">
        <Windows>
            <telerik:RadWindow ID="rwGrid" runat="server" Behaviors="Close,Move">
                <ContentTemplate>
                    <telerik:RadGrid ID="rgGrid" runat="server" AutoGenerateColumns="False"CellSpacing="0"
                        GridLines="None" OnNeedDataSource="rgGrid_NeedDataSource">
                        <MasterTableView AllowSorting="False">
                            <NoRecordsTemplate>
                                <div>
                                    Empty</div>
                            </NoRecordsTemplate>
                            <Columns>
                                <telerik:GridBoundColumn DataField="Description" />
                            </Columns>
                        </MasterTableView>
                    </telerik:RadGrid>
                </ContentTemplate>
            </telerik:RadWindow>
        </Windows>
    </telerik:RadWindowManager>
    </form>
</body>
</html>

Thanks for the help.
David
Top achievements
Rank 1
 answered on 03 Jul 2012
1 answer
97 views
Hi - I've been trying to convert my application from using RadCharts to using the much nicer looking RadHtmlCharts (Q2 2012 v2012.2.607.35), but have got stuck at implementing the equivalent of the RadChart's ActiveRegions (http://www.telerik.com/help/aspnet-ajax/chart-image-maps.html).

Does anyone know if the RadHtmlChart supports any form of active elements with click through to a custom url?

Thanks in advance
Tom

Marin Bratanov
Telerik team
 answered on 03 Jul 2012
12 answers
698 views

I have a server control which shows/hides a few radcombobox controls based on previous selections (within the same control).  These controls are placed inside an UpdatePanel (panel created OnInit, controls added OnLoad) to minimize full page refreshes and this all works great.

We're consolidating on RadAjax and I figured it would be a simple migration to RadAjaxPanel but when I switch in the RadAjaxPanel I'm getting full page refreshes, not just on the first select (as described in other threads) but on all control interactions.

I have set EnableAJAX to true and I have also hooked the AjaxSettingCreating event to get the default behaviour of UpdatePanel (i.e. UpdateMode = always and ChildrenAsTriggers = true).

Are there some other settings I need to make to get parity with the UpdatePanel?

Many Thanks,

Brian
Maria Ilieva
Telerik team
 answered on 03 Jul 2012
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?