Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
69 views
Never mind, wish i could cancel a post...
KubuliJohn
Top achievements
Rank 1
 asked on 03 Jul 2012
2 answers
108 views
I am working with HTML that embeds a video, here is what I would like to edit:

<p><asset id="705277"><!-- BroadcastDEVPlayer --><div style="display: none;"><!--div--></div><!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/.  --><script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"><!--script--></script><object id="myExperience1716942643001" class="BrightcoveExperience"><param name="bgcolor" value="#FFFFFF"><!--param--></param><!--p--><param name="width" value="640"><!--param--></param><param name="height" value="390"><!--param--></param><param name="playerID" value="1686393367001"><!--param--></param><param name="playerKey" value="AQ~~,AAAABvZFG8E~,tuqDbg7x3grEeW3gQXG_DLcv5dBdNd_2"><!--param--></param><param name="isSlim" value="true"><!--param--></param><param name="dynamicStreaming" value="true"><!--param--></param><param name="@videoPlayer" value="1716942643001"><!--param--></param></object><!-- This script tag will cause the Brightcove Players defined above it to be created as soon as the line is read by the browser. If you wish to have the player instantiated only after the rest of the HTML is processed and the page load is complete, remove the line.  --><script type="text/javascript">brightcove.createExperiences();</script><!-- End of Brightcove Player --></asset></p><p />

However, when I view the HTML that actually got inserted to the editor, everything that should have been enclosed by the p and asset tags got moved outside them.  What is causing it and what can I do to prevent it?  I have experimented with turning off filters, but that doesn't seem to help.

<p><asset id="705277"><!-- BroadcastDEVPlayer --></asset></p><div style="display: none;"><!--div--></div><!-- By use of this code snippet, I agree to the Brightcove Publisher T and C found at https://accounts.brightcove.com/en/terms-and-conditions/.  --><script language="JavaScript" type="text/javascript" src="http://admin.brightcove.com/js/BrightcoveExperiences.js"><!--script--></script><object type="application/x-shockwave-flash" data="http://c.brightcove.com/services/viewer/federated_f9?&amp;width=640&amp;height=390&amp;flashID=myExperience1716942643001&amp;bgcolor=%23FFFFFF&amp;playerID=1686393367001&amp;playerKey=AQ~~%2CAAAABvZFG8E~%2CtuqDbg7x3grEeW3gQXG_DLcv5dBdNd_2&amp;isSlim=true&amp;dynamicStreaming=true&amp;%40videoPlayer=1716942643001&amp;autoStart=&amp;debuggerID=&amp;startTime=1341257000939" id="myExperience1716942643001" width="640" height="390" class="BrightcoveExperience" seamlesstabbing="false"><param name="allowScriptAccess" value="always"><param name="allowFullScreen" value="true"><param name="seamlessTabbing" value="false"><param name="swliveconnect" value="true"><param name="wmode" value="window"><param name="quality" value="high"><param name="bgcolor" value="#FFFFFF"></object><!-- This script tag will cause the Brightcove Players defined above it to be created as soon as the line is read by the browser. If you wish to have the player instantiated only after the rest of the HTML is processed and the page load is complete, remove the line.  --><script type="text/javascript">brightcove.createExperiences();</script><!-- End of Brightcove Player -->

Thanks,
Igor
Igor
Top achievements
Rank 1
 answered on 03 Jul 2012
8 answers
224 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
71 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
122 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
122 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
95 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
65 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
291 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
236 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
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?