Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
115 views
I'm using the editor in DNN (Of course) and I'm trying to figure out how, once a page has loaded with text in the editor, to set the cursor at the first character in the set at the top, instead of at the bottom like it's coming up now. Is there any tips on how to set the cursor position?

Thanks!
Rumen
Telerik team
 answered on 24 Aug 2010
1 answer
180 views
Hi,
       I have a grid declarative hierarchy model. 3 level depth (order, detail, items) The grid shows data correctly so the keys are mapped fine. Issue is paging. Attached is the screen shots.
So, what i figure out its showing is a total for the whole layer instead of just the record. Page Size of 5 is set on the grid tag ( i tried it on each gridview but it did not work properly)
Grid1.jpg
The english language has 2 subrecord each having 3 records. So, originally it was showing me 5 of 6 ; showing 3 records from 1st and 2 records from 2nd sub titles. it is misleading. As each has only 3 records so total is not correct (why do the total for all the records ?)
Both having a paging 1 and 2 link at the bottom.
i added few more records and the 2nd layer records totals to 10 now. So, its showing 10 on each record with paging links, although many of them have no records on the 2nd page obviously.

Grid2.jpg
The first subrecord does not show any record on first page but do show the record on the 2nd page.(both subrecords have 1 item each)

So, summary is that its doing total on the layer basis instead of for each record sub child count.

Finally, the data binding is in the needdatasource using linq

grid.datasource = EntitySet<Orders>

grid.MasterTableView.DetailTables[0].DataSource = IEnumerable<detailOrder>

 

grid.MasterTableView.DetailTables[0].DetailTables[0].DataSource = IEnumerable<Items>;


Any ideas ?

Thanks,

Osman


Veli
Telerik team
 answered on 24 Aug 2010
2 answers
119 views

I Copied mailbox (linked below) and it is work good. but when i changed XmlDataSource to my SqlDataSource (i fixed all data bound corectly) all GetDataKeyValue retunrn null.

 

<script type="text/javascript">

 

function ShowMessage(sender, args)

    {

 

        var id = args.getDataKeyValue("ID");//<==??????????????????????

 

        var wnd = window.radopen("Details.aspx?AuthorID=" + id, null);

 

        / /Get the clicked row

 

        var index = args.get_itemIndexHierarchical();

 

        var item = args.get_tableView().get_dataItems()[index];

 

        var rowElement = item.get_element();

 

        //Get coordinates of the row and reposition the window relative to it

 

        var bounds = $telerik.getBounds(rowElement);

        wnd.moveTo(bounds.x + 120 + index * 10, bounds.y - 180);

    }

 

</script>

 

 

Link:  http://demos.telerik.com/aspnet-ajax/window/examples/demoemail/defaultcs.aspx
morteza
Top achievements
Rank 1
 answered on 24 Aug 2010
3 answers
131 views
Hi,

We have just upgraded our version of RadEditor to 5.8.0.0 and are experiencing a problem with our custom list forms. We receive the following error when trying to open a custom list form: Script controls may not be registered before PreRender.

If we change any multiple list fields to plain text, the problem disappears (as RadEditor is no longer functioning).

We have searched the forums and tried a few things:

1) We tried this - http://www.telerik.com/community/forums/sharepoint-2007/full-featured-editor/prerender-error-with-custom-list-form.aspx No luck. We ended up with this error:The control type 'System.Web.UI.ScriptManager' is not allowed on this page. The type is not registered as safe.

2) We also tried this - http://www.telerik.com/help/aspnet-ajax/moss-install-aspnet-ajax-35.html Again, no luck. <system.web.extensions> was not recognised and caused an error.

Are you able to suggest what we could try next?

Thanks, Kirsty
Stanimir
Telerik team
 answered on 24 Aug 2010
1 answer
112 views

i trying to drag a node to radscheduler, but the event node_Drop not fire, post some code:

<telerik:RadScheduler ID="radGantt" runat="server"
                            DataDescriptionField="Subject" DataEndField="End" DataKeyField="ID" 
                            DataSourceID="ObjectDataSource1" DataStartField="Start" Height="650px" Width="500px"
                            DataSubjectField="Subject" SelectedView="WeekView" FirstDayOfWeek="Monday" 
                            ShowAllDayRow="False" ShowFooter="False" 
                            ShowViewTabs="False" WorkDayEndTime="19:00:00" 
                            DayEndTime="19:00:00" Skin="Office2007" 
                            onnavigationcomplete="radGantt_NavigationComplete" 
                            onappointmentdelete="radGantt_AppointmentDelete" 
                            onappointmentupdate="radGantt_AppointmentUpdate" 
                            onappointmentcontextmenuitemclicked="radGantt_AppointmentContextMenuItemClicked">
                             <AppointmentContextMenus>
                                <telerik:RadSchedulerContextMenu runat="server" ID="SchedulerAppointmentContextMenu">
                                    <Items>
                                        <telerik:RadMenuItem Text="Visualizza ODL" Value="ODL" />
                                        <telerik:RadMenuItem Text="Visualizza Richiesta" Value="REQ" />
                                        <telerik:RadMenuItem Text="Rapportino" Value="RAP" />
                                    </Items>
                                </telerik:RadSchedulerContextMenu>
                            </AppointmentContextMenus>
                    </telerik:RadScheduler>
  
                    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                        SelectMethod="AllData" TypeName="FinitenessEVO.AppointmentList">
                    </asp:ObjectDataSource>
<telerik:RadTreeView runat="server" ID="radTree" Height="100%" Width="100%" 
                                 EnableDragAndDrop="True" OnClientNodeDropping="nodeDropping"
                                 oncontextmenuitemclick="radTree_ContextMenuItemClick"
                                 onnodedrop="radTree_NodeDrop" >
                       <CollapseAnimation Duration="100" Type="OutQuint" />
                       <ContextMenus>
                           <telerik:RadTreeViewContextMenu ID="contextTree" runat="server">
                               <Items>
                                   <telerik:RadMenuItem runat="server" Text="Visualizza ODL" Value="ODL">
                                   </telerik:RadMenuItem>
                                   <telerik:RadMenuItem runat="server" Text="Visualizza Richiesta" Value="REQ">
                                   </telerik:RadMenuItem>
                               </Items>
                           </telerik:RadTreeViewContextMenu>
                       </ContextMenus>
             <ExpandAnimation Duration="100" />
         </telerik:RadTreeView>
<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
  
        <script type="text/javascript">
  
            function nodeDropping(sender, eventArgs) {
                // Fired when the user drops a TreeView node
                var node = eventArgs.get_sourceNode();
                var text = node.get_text();
                var htmlElement = eventArgs.get_htmlElement();
                var scheduler = $find('<%= radGantt.ClientID %>');
  
                if (isPartOfSchedulerAppointmentArea(htmlElement)) {
                    // The node was dropped over the scheduler appointment area
                    // Find the exact time slot and save its unique index in the hidden field
                    var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
  
                    $get('<%=TargetSlotHiddenField.ClientID %>').value = timeSlot.get_index();
  
                    // The HTML needs to be set in order for the postback to execute normally
                    eventArgs.set_htmlElement("TargetSlotHiddenField.ClientID");
                }
                else if ($telerik.isDescendant(treeViewElement, htmlElement)) {
                    // The node was dropped over the TreeView
                    // The HTML needs to be set in order for the postback to execute normally
                    eventArgs.set_destinationHtmlElement(treeViewElement);
                }
                else {
                    // The node was dropped elsewhere on the document
                    eventArgs.set_cancel(true);
                }
            }
            function rowDropping(sender, eventArgs) {
                // Fired when the user drops a grid row
                var htmlElement = eventArgs.get_destinationHtmlElement();
                var scheduler = $find('<%= radGantt.ClientID %>');
  
                if (isPartOfSchedulerAppointmentArea(htmlElement)) {
                    // The row was dropped over the scheduler appointment area
                    // Find the exact time slot and save its unique index in the hidden field
                    var timeSlot = scheduler._activeModel.getTimeSlotFromDomElement(htmlElement);
  
                    $get('<%=TargetSlotHiddenField.ClientID %>').value = timeSlot.get_index();
  
                    // The HTML needs to be set in order for the postback to execute normally
                    eventArgs.set_destinationHtmlElement("TargetSlotHiddenField.ClientID");
                }
                else {
                    // The node was dropped elsewhere on the document
                    eventArgs.set_cancel(true);
                }
            }
  
            function isPartOfSchedulerAppointmentArea(htmlElement) {
                // Determines if an html element is part of the scheduler appointment area
                // This can be either the rsContent or the rsAllDay div (in day and week view)
                return $telerik.$(htmlElement).parents().is("div.rsAllDay") ||
                            $telerik.$(htmlElement).parents().is("div.rsContent")
            }
  
            function onRowDoubleClick(sender, args) {
                sender.get_masterTableView().editItem(args.get_itemIndexHierarchical());
            }
  
            function refreshGrid() {
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
            }  
  
        </script>
  
    </telerik:RadScriptBlock>
                    <input type="hidden" runat="server" id="TargetSlotHiddenField" />
Simon
Telerik team
 answered on 24 Aug 2010
1 answer
65 views
Hello
 I am loading my root nodes of the tree on the server side using RootNode.Nodes.Add(ChildNode)
The Child nodes have a ExpandMode set to Webservice.In the aspx page i have the following setting for the tree

 

<WebServiceSettings Path="../WebService/NAMWS.asmx" Method="GetWorkOrders" />

 

 


All this works fine but when i click the root nodes the child nodes are loaded from the web service but i want the expandmode of the child nodes also to be web service i want to have an expand icon for the child node where i should be able to load child nodes to the child node using web service. .. i should be able to continue loading as many levels of child nodes using web using web service. how do i do this and set the expand modes of the child nodes to webservice
Simon
Telerik team
 answered on 24 Aug 2010
4 answers
211 views
Good Day Admin

i have a radeditor that is defined like this

<telerik:RadEditor ID="txtbody" runat="server" Skin="Sunset">
        <Tools>
            <telerik:EditorToolGroup Tag="MainToolbar">
                <telerik:EditorTool Name="FindAndReplace" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Undo" />
                <telerik:EditorTool Name="Redo" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="Cut" />
                <telerik:EditorTool Name="Copy" />
                <telerik:EditorTool Name="Paste" ShortCut="CTRL+!" />
            </telerik:EditorToolGroup>
            <telerik:EditorToolGroup Tag="Formatting">
                <telerik:EditorTool Name="Bold" />
                <telerik:EditorTool Name="Italic" />
                <telerik:EditorTool Name="Underline" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="ForeColor" />
                <telerik:EditorTool Name="BackColor" />
                <telerik:EditorSeparator />
                <telerik:EditorTool Name="FontName" />
                <telerik:EditorTool Name="RealFontSize" />
            </telerik:EditorToolGroup>
        </Tools>
        <Content>
</Content>
    </telerik:RadEditor>

when i run my application the Rad-editor, show the toolbar fine, but you cant write anything on in. Its like disabled, the writing does nothing.

Thanks
Vuyiswa
Top achievements
Rank 2
 answered on 24 Aug 2010
1 answer
315 views
Ok... on a standard GridView and I can do this:

protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
    string fileName = e.Values["FullName"].ToString();
    if (File.Exists(Server.MapPath("~/Uploads/" + fileName)))
    {
        File.Delete(Server.MapPath("~/Uploads/" + fileName));
    }
}

Can someone please tell me the equivalent uisng the RadGrid... I'm pulling my hair out. 

Thanks!!!
Sebastian
Telerik team
 answered on 24 Aug 2010
1 answer
146 views
Hi:

I'm developing some pages to use as templates, and one of them has a radlistview in the left side. There seems to be no problem when firing the Initinsert ItemCommand when that radlistview has items, but when firing it with no items, I get a JScript null reference exception. It's driving me nuts, since I cannot find what is causing the exception. Maybe I should manage some event, I don't know... I hope someone can lend me a hand on this.

Here is the code:

Parent page aspx:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Raiz.aspx.vb" Inherits="PruebasTelerik.Raiz" %>
 
<%@ Register Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!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">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <asp:UpdatePanel ID="upPrincipal" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Panel ID="pPrincipal" runat="server" CssClass="SeccionPrincipal" ScrollBars="None"
                Height="83%">
                <asp:UpdatePanel ID="upSeccionLateral" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel ID="SeccionLateral" runat="server" CssClass="SeccionIzquierda">
                            <%-- Aquí va el RadListView o RadTreeView en el cual seleccionar el elemento --%>
                            Lateral
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="upSeccionDerecha" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel ID="SeccionDerecha" CssClass="SeccionDerecha" runat="server" Height="100%"
                            ScrollBars="Auto" Visible="false">
                            <asp:Label ID="lblInfo" Text="" CssClass="ContenidoInteriorTituloSinBarra" runat="server" />
                            <telerik:RadTabStrip ID="Pestanyas" runat="server" SelectedIndex="0" ValidationGroup="GrupoValidacionDatosGenerales"
                                MultiPageID="ContenidoPestanyas" Width="90%">
                                <Tabs>
                                    <telerik:RadTab PageViewID="VistaDatosGenerales" Selected="true" Text="Datos Generales"
                                        Value="0" CssClass="Pestanya" SelectedCssClass="Pestanya" HoveredCssClass="Pestanya" />
                                </Tabs>
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage ID="ContenidoPestanyas" runat="server" CssClass="MultiPage"
                                SelectedIndex="0">
                                <telerik:RadPageView ID="VistaDatosGenerales" runat="server" Selected="True">
                                    VistaDatosGenerales
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>
                            <div id="SeccionEdicion" runat="server" class="BotonesEdicion">
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesInsertar"
                                    visible="false">
                                    <tr>
                                        <td valign="top">
                                            <img alt="Guardando..." src="../images_diseno/bt_guardar_OFF.png" border="0" style="display: none;"
                                                id="cmdInsertarBlanco" />
                                            <asp:ImageButton AlternateText="Insertar" ImageUrl="../images_diseno/bt_guardar.png"
                                                OnClick="cmdInsertar_Click" CommandName="Insertar" ID="cmdInsertar" runat="server"
                                                OnClientClick="return realizarValidacion();" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Cancelar" ImageUrl="../images_diseno/bt_cancelar.png"
                                                CommandName="CancelarInsertando" ID="cmdCancelar" runat="server" OnClick="cmdCancelar_Click"
                                                CausesValidation="false" />
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesSeleccionar"
                                    visible="true">
                                    <tr>
                                        <td valign="top">
                                            <asp:ImageButton AlternateText="Editar" ImageUrl="../images_diseno/bt_editar.png"
                                                CommandName="Edit" CausesValidation="false" ID="cmdEditar" runat="server" OnClick="cmdEditar_Click" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Borrar" ImageUrl="../images_diseno/bt_eliminar.png"
                                                OnClick="cmdBorrar_Click" CommandName="Baja" CausesValidation="false" ID="cmdBorrar"
                                                runat="server" OnClientClick="return ConfirmarBorrado(this);" />
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesEditar"
                                    visible="false">
                                    <tr>
                                        <td valign="top">
                                            <asp:ImageButton AlternateText="Actualizar" ImageUrl="../images_diseno/bt_guardar.png"
                                                CommandName="Editar" ID="cmdActualizar" runat="server" OnClick="cmdActualizar_Click" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Cancelar" ImageUrl="../images_diseno/bt_cancelar.png"
                                                OnClick="cmdCancelar2_Click" CommandName="Cancel" ID="cmdCancelar2" runat="server"
                                                CausesValidation="false" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="upIndicadorUpdate" AssociatedUpdatePanelID="upPrincipal"
        runat="server">
        <ProgressTemplate>
            <div class="IndicadorProgreso">
                <img src="../images_diseno/ajax-loader.gif" alt="Cargando..." id="loadingimage" class="TotalmenteCentrado" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:HiddenField ID="hdDatosGeneralesEditando" runat="server" />
    <asp:HiddenField ID="hdGuardarCambios" runat="server" />
    <asp:HiddenField ID="hdUltimaFichaVista" runat="server" />
    <asp:HiddenField ID="hdMantenimientoActualizado" runat="server" />
    <asp:HiddenField ID="hdIdRegistro" runat="server" />
    <telerik:RadCodeBlock ID="rcbCodigoCliente" runat="server">
 
        <script type="text/javascript">
 
            function comprobarNoElementosSinGuardar(indexFichaSeleccionada) {
                var elementosSinGuardar = false
                var vista = document.getElementById('<%=hdUltimaFichaVista.ClientID%>');
                if (vista.value == '') {
                    vista.value = '0';
                }
                var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
 
                // En caso de que sea la ficha 0 (Datos Generales) comprobamos que el resto de fichas no esten en edicion
                if (vista.value == 0 && indexFichaSeleccionada != 0) {
                    if (EditandoDatosGenerales.value == 'true') {
                        elementosSinGuardar = true;
                    }
                }
                return elementosSinGuardar;
            }
 
            var isTabClicked = false;
            var tabPulsado;
 
            function onTabSelecting(sender, args) {
                var multiPagina = document.getElementById('<%=ContenidoPestanyas.ClientID%>');
                var tabOriginal = sender.get_selectedTab();
                tabPulsado = args.get_tab();
                var valorOriginal = null;
                if (tabOriginal) {
                    valorOriginal = tabOriginal.get_value();
                }
                else {
                    valorOriginal = 0;
                }
                var vista = document.getElementById('<%=hdUltimaFichaVista.ClientID%>');
                vista.value = valorOriginal;
                if ((isTabClicked == false) && (comprobarNoElementosSinGuardar(tabPulsado.get_value()))) {
                    var oWnd = window.radopen('../controles/alertas.aspx?msg=' + '1', 'Alerta de Guardado');
                    // Opens the window
                    oWnd.add_close(cierreConfirmacionTabSelecting);
                    // set a function to be called when RadWindow is closed
                    args.set_cancel(true);
                }
                else {
                    isTabClicked = false
                    return true;
                }
            }
 
            function cierreConfirmacionTabSelecting(oWnd, args) {
                isTabClicked = true;
                oWnd.setUrl("about:blank");
                // Sets url to blank
                oWnd.remove_close(CierreConfirmacionSeleccion);
                // remove the close handler - it will be set again on the next opening
                var arg = args.get_argument();
                if (arg) {
                    var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
                    var bt = arg.boton
                    var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
 
                    switch (bt) {
                        case 1:
                            // botonpulsado = 'Si';
                            var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'true';
                                if (tabPulsado) {
                                    tabPulsado.click();
                                }
                            }
                            break;
                        case 2:
                            // botonpulsado = 'No';
                            EditandoDatosGenerales.value = 'false';
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'false';
                                var botonCancelar = document.getElementById('<%=cmdCancelar2.ClientID %>');
                                if (botonCancelar) {
                                    botonCancelar.click();
                                }
                                if (tabPulsado) {
                                    tabPulsado.click();
                                }
                            }
                            break;
                        case 3:
                            // botonpulsado = 'Cancelar';
                            isTabClicked = false;
                            break;
                    }
                }
            }
 
            function realizarValidacion(nombreGrupoValidacion) {
                if ((nombreGrupoValidacion == null) || (nombreGrupoValidacion == '')) {
                    Page_ClientValidate();
                }
                else {
                    Page_ClientValidate(nombreGrupoValidacion);
                }
                if (Page_IsValid) {
                    return true;
                }
                else {
                    return false;
                }
            }
             
        </script>
 
    </telerik:RadCodeBlock>
 
    </form>
</body>
</html>

Parent page codebehind:

Imports Telerik.Web.UI
Imports System.Reflection
 
Partial Public Class Raiz
    Inherits System.Web.UI.Page
 
 
    Protected IdSeguridad As Integer = 3
    Protected Delegate Function FuncionRecuperacionDatosComboBox() As List(Of ListItem)
    Protected Delegate Function FuncionRecuperacionDatosComboBoxLigado(ByVal IdRegistro As Integer) As List(Of ListItem)
 
    Protected Overridable Sub Page_Load(ByVal origen As Object, ByVal argumentos As System.EventArgs) Handles Me.Load
        If Not IsPostBack Then
            ComprobarPermisosEdicion(IdSeguridad)
            CargarDesplegablesEstaticos()
            hdDatosGeneralesEditando.Value = "N"
        End If
    End Sub
 
    Protected Overridable Sub CargarDatosDcha(ByVal IdRegistro As Integer)
 
    End Sub
 
     Protected Overridable Sub cmdActualizar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        Editar(False)
    End Sub
 
    Protected Overridable Sub cmdBorrar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        BorrarDatosDcha()
        Editar(False)
        VerSeccionDcha(False)
    End Sub
 
     Protected Overridable Sub cmdCancelar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        BorrarDatosDcha()
        VerSeccionDcha(False)
        Editar(False)
    End Sub
 
    Protected Sub cmdCancelar2_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        BorrarDatosDcha()
        If hdIdRegistro IsNot Nothing AndAlso Not hdIdRegistro.Value.Equals(String.Empty) AndAlso IsNumeric(hdIdRegistro.Value) Then
            CargarDatosDcha(hdIdRegistro.Value)
        End If
        Editar(False)
    End Sub
 
    Protected Sub cmdEditar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        Editar(True)
    End Sub
 
    Protected Overridable Sub cmdInsertar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
 
    End Sub
 
    Protected Overridable Sub cmdNuevo_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        TabPulsado(Pestanyas, New RadTabStripEventArgs(Pestanyas.Tabs(0)))
        BorrarDatosDcha()
        Pestanyas.Tabs(0).Selected = True
        Pestanyas.SelectedIndex = 0
        ContenidoPestanyas.SelectedIndex = 0
        VerSeccionDcha(True)
        Editar(True)
        botonesEditar.Visible = False
        botonesInsertar.Visible = True
        lblInfo.Text = "Complete los siguientes datos"
    End Sub
 
    Protected Overridable Sub Editar(ByVal enEdicion As Boolean)
        CambiarHiddenEditando(enEdicion)
        HabilitarValidadores(enEdicion)
        botonesEditar.Visible = enEdicion
        botonesSeleccionar.Visible = Not enEdicion
        botonesInsertar.Visible = False
    End Sub
 
    Protected Sub EstablecerEdicionDesplegable(ByVal desplegable As RadComboBox, ByVal enEdicion As Boolean, Optional ByVal botonMantenimiento As ImageButton = Nothing)
        desplegable.Enabled = enEdicion
        If desplegable.Items.Count > 0 Then
            desplegable.Enabled = enEdicion
            If botonMantenimiento IsNot Nothing Then
                botonMantenimiento.Enabled = enEdicion
                If enEdicion Then
                    botonMantenimiento.ImageUrl = "../images_diseno/bt_mas.png"
                Else
                    botonMantenimiento.ImageUrl = "../images_diseno/bt_mas_off.png"
                End If
            End If
        Else
            desplegable.Enabled = False
            If botonMantenimiento IsNot Nothing Then
                botonMantenimiento.Enabled = False
                botonMantenimiento.ImageUrl = "../images_diseno/bt_mas_off.png"
            End If
        End If
    End Sub
 
    Protected Sub VerSeccionDcha(ByVal visible As Boolean)
        SeccionDerecha.Visible = visible
    End Sub
 
    Protected Sub CambiarHiddenEditando(ByVal enEdicion As Boolean)
        hdDatosGeneralesEditando.Value = enEdicion.ToString.ToLower
    End Sub
 
    Protected Sub CancelarCambios()
        If botonesInsertar.Visible = True Then
            cmdCancelar_Click(Nothing, Nothing)
        ElseIf botonesEditar.Visible = True Then
            cmdCancelar2_Click(Nothing, Nothing)
        End If
    End Sub
 
    Protected Sub GuardarCambios()
        If hdDatosGeneralesEditando.Value.Equals(Boolean.TrueString.ToLower) Then
            If botonesEditar.Visible Then
                cmdActualizar_Click(Nothing, Nothing)
            ElseIf botonesInsertar.Visible Then
                cmdInsertar_Click(Nothing, Nothing)
            End If
            Editar(False)
            CambiarHiddenEditando(False)
        End If
    End Sub
 
    Protected Overridable Sub TabPulsado(ByVal origen As Object, ByVal argumentos As RadTabStripEventArgs)
        Dim tabAnterior As Integer = -1
        If hdUltimaFichaVista IsNot Nothing AndAlso Not hdUltimaFichaVista.Value.Equals(String.Empty) AndAlso IsNumeric(hdUltimaFichaVista.Value) Then
            tabAnterior = Integer.Parse(hdUltimaFichaVista.Value)
        End If
        Dim tabSeleccionado As RadTab = argumentos.Tab
        If hdGuardarCambios.Value.Equals(Boolean.TrueString.ToLower) Then
            Select Case tabAnterior
                Case 0
                    GuardarCambios()
            End Select
        Else
            Select Case tabAnterior
                Case 0
                    CancelarCambios()
            End Select
        End If
        hdUltimaFichaVista.Value = tabSeleccionado.Index
        hdGuardarCambios.Value = Boolean.FalseString.ToLower
    End Sub
 
    Protected Overridable Sub Orden(ByVal origen As Object, ByVal argumentos As CommandEventArgs)
        Select Case argumentos.CommandName
            Case "Select"
                hdIdRegistro.Value = argumentos.CommandArgument
                If (hdGuardarCambios.Value = "true") Then
                    GuardarCambios()
                    hdGuardarCambios.Value = "false"
                Else
                    CancelarCambios()
                End If
                Dim args As New RadTabStripEventArgs(Pestanyas.SelectedTab)
                TabPulsado(Me, args)
                VerSeccionDcha(True)
                Editar(False)
                BorrarDatosDcha()
                CargarDatosDcha(argumentos.CommandArgument)
                actualizarPaneles()
        End Select
    End Sub
 
    Protected Overridable Sub BorrarDatosDcha()
        lblInfo.Text = ""
    End Sub
 
    Protected Sub ComprobarPermisosEdicion(ByVal Id As Integer)
        Dim TienePermisoEdicion As Boolean = True 'ComprobarPermisos(Id)
        If TienePermisoEdicion Then
            cmdEditar.Enabled = True
            cmdEditar.ImageUrl = "../images_diseno/bt_editar.png"
            cmdEditar.AlternateText = "Editar"
            cmdEditar.Attributes.Add("alt", "Editar")
 
            cmdBorrar.Enabled = True
            cmdBorrar.ImageUrl = "../images_diseno/bt_eliminar.png"
            cmdBorrar.AlternateText = "Eliminar"
            cmdBorrar.Attributes.Add("alt", "Eliminar")
        Else
            cmdEditar.Enabled = False
            cmdEditar.ImageUrl = "../images_diseno/bt_editar_OFF.png"
            cmdEditar.AlternateText = "Editar (No tiene permisos para esta acción)"
            cmdEditar.Attributes.Add("alt", "Editar (No tiene permisos para esta acción)")
 
            cmdBorrar.Enabled = False
            cmdBorrar.ImageUrl = "../images_diseno/bt_eliminar_OFF.png"
            cmdBorrar.AlternateText = "Eliminar (No tiene permisos para esta acción)"
            cmdBorrar.Attributes.Add("alt", "Eliminar (No tiene permisos para esta acción)")
        End If
    End Sub
 
    Protected Overridable Sub CargarDesplegablesEstaticos()
 
    End Sub
 
    Protected Overridable Sub HabilitarValidadores(ByVal enEdicion As Boolean)
 
    End Sub
 
    Protected Overridable Function LeerRegistro() As Object
        Return Nothing
    End Function
 
    Protected Overridable Sub hdMantenimiento_ValueChanged(ByVal origen As Object, ByVal argumentos As EventArgs)
 
    End Sub
 
 
    Protected Sub CargarComboIndependiente(ByVal desplegable As RadComboBox, ByVal funcionCargaDatos As FuncionRecuperacionDatosComboBox, Optional ByVal soloDatosRecuperados As Boolean = False)
        Dim datos As List(Of ListItem) = funcionCargaDatos.Invoke
        CargarCombo(desplegable, datos, soloDatosRecuperados)
    End Sub
 
    Protected Sub CargarComboDependiente(ByVal desplegable As RadComboBox, ByVal funcionCargaDatos As FuncionRecuperacionDatosComboBoxLigado, ByVal IdSeleccionado As Integer, Optional ByVal soloDatosRecuperados As Boolean = False)
        If IdSeleccionado = 0 Then
            desplegable.Items.Clear()
            desplegable.Enabled = False
        Else
            Dim datos As List(Of ListItem) = funcionCargaDatos.Invoke(IdSeleccionado)
            CargarCombo(desplegable, datos, soloDatosRecuperados)
        End If
    End Sub
 
    Private Sub CargarCombo(ByVal desplegable As RadComboBox, ByVal datos As List(Of ListItem), Optional ByVal soloDatosRecuperados As Boolean = False)
        If datos IsNot Nothing Then
            For Each Item As ListItem In datos
                desplegable.Items.Add(New RadComboBoxItem(Item.Text, Item.Value))
            Next
        End If
        If Not soloDatosRecuperados Then
            Dim ElementoInicio As New RadComboBoxItem("Seleccione un registro...", 0)
            ElementoInicio.Selected = True
            desplegable.Items.Insert(0, ElementoInicio)
            desplegable.SelectedIndex = 0
            desplegable.SelectedValue = 0
        End If
    End Sub
 
    Protected Sub actualizarPaneles()
        upSeccionDerecha.Update()
        upSeccionLateral.Update()
        upPrincipal.Update()
    End Sub
 
End Class

Child page aspx:

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Listado.aspx.vb" Inherits="PruebasTelerik.Listado" %>
 
<%@ Register Assembly="Telerik.Web.UI, Version=2010.2.713.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4"
    Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
 
<!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">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <asp:UpdatePanel ID="upPrincipal" runat="server" UpdateMode="Conditional">
        <ContentTemplate>
            <asp:Panel ID="pPrincipal" runat="server" CssClass="SeccionPrincipal" ScrollBars="None"
                Height="83%">
                <asp:UpdatePanel ID="upSeccionLateral" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel ID="SeccionLateral" runat="server" CssClass="SeccionIzquierda">
                            <%-- Aquí va el RadListView o RadTreeView en el cual seleccionar el elemento --%>
                            <div class="ListadoLateral" style="width: 100%;">
                                <telerik:RadListView ID="rlvListado" runat="server" DataKeyNames="Value" OnItemCommand="Orden" OnItemInserting="pruebaInsercion" OnItemInserted="pruebaInsercion" OnItemCreated="pruebaInsercion"
                                    OnSelectedIndexChanged="CambioSelect" OnNeedDataSource="CargarListado" EnableViewState="False">
                                    <LayoutTemplate>
                                        <div class="CabeceraListado">
                                            <div class="ParteIzquierdaCL">
                                            </div>
                                            <div class="ParteCentralCL">
                                                <asp:Label ID="lblCabecera" runat="server" Text="Tipo de registro" CssClass="Cabecera" />
                                            </div>
                                            <div class="ParteDerechaCL">
                                            </div>
                                        </div>
                                        <div class="Buscador">
                                            <telerik:RadTextBox ID="txtBuscar" runat="server" class="BuscadorTxt" />
                                            <asp:ImageButton Visible="true" alt="Buscar" ImageUrl="../images_diseno/bt_buscar.png"
                                                ID="cmdBuscar" runat="server" class="BuscadorBtn" OnClick="cmdBuscar_Click" />
                                        </div>
                                        <div class="LineaSeparacionDivs">
                                            <div class="LineaSeparacionDivsDcha">
                                            </div>
                                            <div class="LineaSeparacionDivsBorde">
                                            </div>
                                        </div>
                                        <div class="Listado">
                                            <div id="ListadoInterior" class="ListadoInterior">
                                                <div class="ContenidoConScrollPrincipal">
                                                    <div id="groupPlaceholder" runat="server">
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="LineaSeparacionDivs">
                                            <div class="LineaSeparacionDivsDcha">
                                            </div>
                                            <div class="LineaSeparacionDivsBorde">
                                            </div>
                                        </div>
                                        <div class="SeccionEdicion">
                                            <div class="ParteIzquierdaSE">
                                            </div>
                                            <div class="ParteCentralSE">
                                                <asp:ImageButton ImageUrl="../images_diseno/bt_nuevoprod.png" alt="New Item" ID="cmdNuevo"
                                                    runat="server" CssClass="Cabecera" CommandName="InitInsert" OnClientClick="InsertNewItem()" />
                                            </div>
                                            <div class="ParteDerechaSE">
                                            </div>
                                        </div>
                                    </LayoutTemplate>
                                    <GroupSeparatorTemplate>
                                        <div class="LineaSeparacionDivs">
                                        </div>
                                    </GroupSeparatorTemplate>
                                    <GroupTemplate>
                                        <div id="itemPlaceholder" runat="server">
                                        </div>
                                    </GroupTemplate>
                                    <ItemSeparatorTemplate>
                                    </ItemSeparatorTemplate>
                                    <ItemTemplate>
                                        <fieldset class="OpcionFondoBlanco" id="ItemFieldSet" style="border-width: 0px">
                                            <asp:LinkButton CssClass="TextoOpcionesMenuNavegacion" ID="cmdAmpliar" OnClientClick="return ConfirmarSeleccion(this)"
                                                CommandName="Select" runat="server" CausesValidation="false" CommandArgument='<%#Eval("Value")%>'
                                                Text='<%# Eval("Text")%>'></asp:LinkButton>
                                        </fieldset>
                                    </ItemTemplate>
                                    <AlternatingItemTemplate>
                                        <fieldset class="OpcionFondoGris" id="AlternatingFieldSet" style="border-width: 0px">
                                            <asp:LinkButton CssClass="TextoOpcionesMenuNavegacion" ID="cmdAmpliar" OnClientClick="return ConfirmarSeleccion(this)"
                                                CommandName="Select" runat="server" CausesValidation="false" CommandArgument='<%#Eval("Value")%>'
                                                Text='<%# Eval("Text")%>'></asp:LinkButton>
                                        </fieldset>
                                    </AlternatingItemTemplate>
                                    <EmptyItemTemplate>
                                        <span class="LabelContenido"></span>
                                    </EmptyItemTemplate>
                                    <EmptyDataTemplate>
                                        <div class="CabeceraListado">
                                            <div class="ParteIzquierdaCL">
                                            </div>
                                            <div class="ParteCentralCL">
                                                <asp:Label ID="lblCabecera" runat="server" Text="Tipo de registro" CssClass="Cabecera" />
                                            </div>
                                            <div class="ParteDerechaCL">
                                            </div>
                                        </div>
                                        <div class="Buscador">
                                            <asp:TextBox Visible="true" ID="txtBuscar" runat="server" class="BuscadorTxt" ></asp:TextBox>
                                            <asp:ImageButton Visible="true" alt="Buscar" ImageUrl="../images_diseno/bt_buscar.png"
                                                ID="cmdBuscar" runat="server" class="BuscadorBtn" OnClick="cmdBuscar_Click" />
                                        </div>
                                        <div class="LineaSeparacionDivs">
                                            <div class="LineaSeparacionDivsDcha">
                                            </div>
                                            <div class="LineaSeparacionDivsBorde">
                                            </div>
                                        </div>
                                        <div class="Listado">
                                            <div id="ListadoInterior" class="ListadoInterior">
                                                <div class="ContenidoConScrollPrincipal" style="min-height: 40px;">
                                                    <span style="height: 19px; margin: 5px;" class="LabelContenido">
                                                        <asp:Label runat="server" ID="EmptyDataTemplate" Text="    No existen registros"></asp:Label>
                                                    </span>
                                                </div>
                                            </div>
                                        </div>
                                        <div class="LineaSeparacionDivs">
                                            <div class="LineaSeparacionDivsDcha">
                                            </div>
                                            <div class="LineaSeparacionDivsBorde">
                                            </div>
                                        </div>
                                        <div class="SeccionEdicion">
                                            <div class="ParteIzquierdaSE">
                                            </div>
                                            <div class="ParteCentralSE">
                                                <asp:ImageButton ImageUrl="../images_diseno/bt_nuevoprod.png" alt="New Item" ID="cmdNuevo"
                                                    runat="server" CssClass="Cabecera" CommandName="InitInsert" OnClientClick="InsertNewItem()" />
                                            </div>
                                            <div class="ParteDerechaSE">
                                            </div>
                                        </div>
                                    </EmptyDataTemplate>
                                    <SelectedItemTemplate>
                                        <fieldset class="OpcionFondoVerde" id="ItemFieldSet" style="border-width: 0px">
                                            <asp:LinkButton ID="cmdReducir" CausesValidation="false" CssClass="TextoOpcionesMenuNavegacion"
                                                runat="server" OnClick="Cierra" Text='<%# Eval("Text")%>' CommandName="Deselect"
                                                OnClientClick="deseleccionar(this);" CommandArgument="0"></asp:LinkButton>
                                        </fieldset>
                                    </SelectedItemTemplate>
                                    <EditItemTemplate>
                                        <div class="OpcionFondoVerde">
                                            <%#Eval("Text")%>
                                        </div>
                                    </EditItemTemplate>
                                    <InsertItemTemplate>
                                        <div class="OpcionFondoVerde">
                                              
                                        </div>
                                    </InsertItemTemplate>
                                </telerik:RadListView>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
                <asp:UpdatePanel ID="upSeccionDerecha" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
                        <asp:Panel ID="SeccionDerecha" CssClass="SeccionDerecha" runat="server" Height="100%"
                            ScrollBars="Auto" Visible="false">
                            <asp:Label ID="lblInfo" Text="" CssClass="ContenidoInteriorTituloSinBarra" runat="server" />
                            <telerik:RadTabStrip ID="Pestanyas" runat="server" SelectedIndex="0" ValidationGroup="GrupoValidacionDatosGenerales"
                                MultiPageID="ContenidoPestanyas" Width="90%">
                                <Tabs>
                                    <telerik:RadTab PageViewID="VistaDatosGenerales" Selected="true" Text="Datos Generales"
                                        Value="0" CssClass="Pestanya" SelectedCssClass="Pestanya" HoveredCssClass="Pestanya" />
                                </Tabs>
                            </telerik:RadTabStrip>
                            <telerik:RadMultiPage ID="ContenidoPestanyas" runat="server" CssClass="MultiPage"
                                SelectedIndex="0">
                                <telerik:RadPageView ID="VistaDatosGenerales" runat="server" Selected="True">
                                    VistaDatosGenerales
                                </telerik:RadPageView>
                            </telerik:RadMultiPage>
                            <div id="SeccionEdicion" runat="server" class="BotonesEdicion">
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesInsertar"
                                    visible="false">
                                    <tr>
                                        <td valign="top">
                                            <img alt="Guardando..." src="../images_diseno/bt_guardar_OFF.png" border="0" style="display: none;"
                                                id="cmdInsertarBlanco" />
                                            <asp:ImageButton AlternateText="Insertar" ImageUrl="../images_diseno/bt_guardar.png"
                                                OnClick="cmdInsertar_Click" CommandName="Insertar" ID="cmdInsertar" runat="server"
                                                OnClientClick="return realizarValidacion();" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Cancelar" ImageUrl="../images_diseno/bt_cancelar.png"
                                                CommandName="CancelarInsertando" ID="cmdCancelar" runat="server" OnClick="cmdCancelar_Click"
                                                CausesValidation="false" />
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesSeleccionar"
                                    visible="true">
                                    <tr>
                                        <td valign="top">
                                            <asp:ImageButton AlternateText="Editar" ImageUrl="../images_diseno/bt_editar.png"
                                                CommandName="Edit" CausesValidation="false" ID="cmdEditar" runat="server" OnClick="cmdEditar_Click" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Borrar" ImageUrl="../images_diseno/bt_eliminar.png"
                                                OnClick="cmdBorrar_Click" CommandName="Baja" CausesValidation="false" ID="cmdBorrar"
                                                runat="server" OnClientClick="return ConfirmarBorrado(this);" />
                                        </td>
                                    </tr>
                                </table>
                                <table border="0" cellpadding="0" cellspacing="0" runat="server" id="botonesEditar"
                                    visible="false">
                                    <tr>
                                        <td valign="top">
                                            <asp:ImageButton AlternateText="Actualizar" ImageUrl="../images_diseno/bt_guardar.png"
                                                CommandName="Editar" ID="cmdActualizar" runat="server" OnClick="cmdActualizar_Click" />
                                        </td>
                                        <td valign="top">
                                            <img alt="" src="../images_diseno/bt_separador.png" />
                                            <asp:ImageButton AlternateText="Cancelar" ImageUrl="../images_diseno/bt_cancelar.png"
                                                OnClick="cmdCancelar2_Click" CommandName="Cancel" ID="cmdCancelar2" runat="server"
                                                CausesValidation="false" />
                                        </td>
                                    </tr>
                                </table>
                            </div>
                        </asp:Panel>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </asp:Panel>
            <asp:HiddenField ID="hdDatosGeneralesEditando" runat="server" />
            <asp:HiddenField ID="hdGuardarCambios" runat="server" />
            <asp:HiddenField ID="hdUltimaFichaVista" runat="server" />
            <asp:HiddenField ID="hdMantenimientoActualizado" runat="server" />
            <asp:HiddenField ID="hdIdRegistro" runat="server" />
            <asp:HiddenField ID="hdFiltro" runat="server" />
        </ContentTemplate>
    </asp:UpdatePanel>
    <asp:UpdateProgress ID="upIndicadorUpdate" AssociatedUpdatePanelID="upPrincipal"
        runat="server">
        <ProgressTemplate>
            <div class="IndicadorProgreso">
                <img src="../images_diseno/ajax-loader.gif" alt="Cargando..." id="loadingimage" class="TotalmenteCentrado" />
            </div>
        </ProgressTemplate>
    </asp:UpdateProgress>
    <telerik:RadCodeBlock ID="rcbCodigoCliente" runat="server">
 
        <script type="text/javascript">
 
            function InsertNewItem() {
                var listView = $find("<%= rlvListado.ClientID %>");
                listView.insertItem();
            }
             
            function deseleccionar(sender, eventArgs) {
                if (sender) {
                    var hdIdRegistro = document.getElementById('<%= hdIdRegistro.ClientID %>');
                    if (hdIdRegistro) {
                        hdIdRegistro.value = '';
                    }
                }
            }
 
            function comprobarNoElementosSinGuardar(indexFichaSeleccionada) {
                var elementosSinGuardar = false
                var vista = document.getElementById('<%=hdUltimaFichaVista.ClientID%>');
                if (vista.value == '') {
                    vista.value = '0';
                }
                var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
 
                // En caso de que sea la ficha 0 (Datos Generales) comprobamos que el resto de fichas no esten en edicion
                if (vista.value == 0 && indexFichaSeleccionada != 0) {
                    if (EditandoDatosGenerales.value == 'true') {
                        elementosSinGuardar = true;
                    }
                }
                return elementosSinGuardar;
            }
 
            var isTabClicked = false;
            var tabPulsado;
 
            function onTabSelecting(sender, args) {
                var multiPagina = document.getElementById('<%=ContenidoPestanyas.ClientID%>');
                var tabOriginal = sender.get_selectedTab();
                tabPulsado = args.get_tab();
                if (tabOriginal) {
                    var valorOriginal = tabOriginal.get_value();
                }
                else {
                    var valorOriginal = 0;
                }
                var vista = document.getElementById('<%=hdUltimaFichaVista.ClientID%>');
                vista.value = valorOriginal;
                if ((isTabClicked == false) && (comprobarNoElementosSinGuardar(tabPulsado.get_value()))) {
                    var oWnd = window.radopen('../controles/alertas.aspx?msg=' + '1', 'Alerta de Guardado');
                    // Opens the window
                    oWnd.add_close(cierreConfirmacionTabSelecting);
                    // set a function to be called when RadWindow is closed
                    args.set_cancel(true);
                }
                else {
                    isTabClicked = false
                    return true;
                }
            }
 
            function cierreConfirmacionTabSelecting(oWnd, args) {
                isTabClicked = true;
                oWnd.setUrl("about:blank");
                // Sets url to blank
                oWnd.remove_close(CierreConfirmacionSeleccion);
                // remove the close handler - it will be set again on the next opening
                var arg = args.get_argument();
                if (arg) {
                    var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
                    var bt = arg.boton
                    var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
 
                    switch (bt) {
                        case 1:
                            // botonpulsado = 'Si';
                            var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'true';
                                if (tabPulsado) {
                                    tabPulsado.click();
                                }
                            }
                            break;
                        case 2:
                            // botonpulsado = 'No';
                            EditandoDatosGenerales.value = 'false';
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'false';
                                var botonCancelar = document.getElementById('<%=cmdCancelar2.ClientID %>');
                                if (botonCancelar) {
                                    botonCancelar.click();
                                }
                                if (tabPulsado) {
                                    tabPulsado.click();
                                }
                            }
                            break;
                        case 3:
                            // botonpulsado = 'Cancelar';
                            isTabClicked = false;
                            break;
                    }
                }
            }
 
            function realizarValidacion(nombreGrupoValidacion) {
                if ((nombreGrupoValidacion == null) || (nombreGrupoValidacion == '')) {
                    Page_ClientValidate();
                }
                else {
                    Page_ClientValidate(nombreGrupoValidacion);
                }
                if (Page_IsValid) {
                    return true;
                }
                else {
                    return false;
                }
            }
 
            var botonSeleccion = null;
            var confirmacionSeleccion = false;
 
            function ConfirmarSeleccion(sender) {
                if (confirmacionSeleccion == false) {
                    botonSeleccion = sender;
 
                    var elementosSinGuardar = false
                    var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
 
                    if (EditandoDatosGenerales.value == 'true') {
                        elementosSinGuardar = true;
                    }
 
                    if (elementosSinGuardar) {
 
                        var oWnd = window.radopen('../controles/alertas.aspx?msg=' + '1', 'Alerta de Guardado');
                        // Opens the window
                        oWnd.add_close(CierreConfirmacionSeleccion);
                        // set a function to be called when RadWindow is closed
                        return false;
                    }
                    else {
                        confirmacionSeleccion = false;
                        return true;
                    }
                }
                else {
                    confirmacionSeleccion = false;
                    return true;
                }
            }
 
            function CierreConfirmacionSeleccion(oWnd, args) {
                confirmacionSeleccion = true;
                oWnd.setUrl("about:blank");
                // Sets url to blank
                oWnd.remove_close(CierreConfirmacionSeleccion);
                // remove the close handler - it will be set again on the next opening
                var arg = args.get_argument();
                var boton;
                var EditandoDatosGenerales = document.getElementById('<%=hdDatosGeneralesEditando.ClientID%>');
 
                if (arg) {
                    var bt = arg.boton
                    var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
 
                    switch (bt) {
                        case 1:
                            // botonpulsado = 'Si';
                            var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'true';
                                if (botonSeleccion) {
                                    botonSeleccion.click();
                                }
                            }
                            break;
                        case 2:
                            // botonpulsado = 'No';
                            EditandoDatosGenerales.value = 'false';
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'false';
                                if (botonSeleccion) {
                                    botonSeleccion.click();
                                }
                            }
                            break;
                        case 3:
                            // botonpulsado = 'Cancelar';
                            confirmacionSeleccion = false;
                            break;
                        case 4:
                            // botonpulsado = 'Aceptar';
                            var hdGuardarCambios = document.getElementById('<%=hdGuardarCambios.ClientID%>');
                            if (hdGuardarCambios) {
                                hdGuardarCambios.value = 'true';
                                if (botonSeleccion) {
                                    botonSeleccion.click();
                                }
                            }
                            break;
                    }
                }
            }
 
        </script>
 
    </telerik:RadCodeBlock>
    </form>
</body>
</html>

Child page codebehind:

Imports Telerik.Web.UI
 
Partial Public Class Listado
    Inherits Raiz
 
 
    Protected Sub cmdBuscar_Click(ByVal origen As Object, ByVal argumentos As ImageClickEventArgs)
        CancelarCambios()
        VerSeccionDcha(False)
        Dim aux As Control = If(rlvListado Is Nothing, Nothing, rlvListado.FindControl("txtBuscar"))
        If aux IsNot Nothing Then
            Dim texto As String = CType(aux, RadTextBox).Text
            If texto IsNot Nothing Then
                hdFiltro.Value = texto
                CargarListado(texto)
            End If
        End If
        actualizarPaneles()
    End Sub
 
    Protected Overrides Sub cmdBorrar_Click(ByVal origen As Object, ByVal argumentos As System.Web.UI.ImageClickEventArgs)
        MyBase.cmdBorrar_Click(origen, argumentos)
        actualizarPaneles()
    End Sub
 
    Protected Overrides Sub cmdActualizar_Click(ByVal origen As Object, ByVal argumentos As System.Web.UI.ImageClickEventArgs)
        MyBase.cmdActualizar_Click(origen, argumentos)
        actualizarPaneles()
    End Sub
 
    Protected Overrides Sub cmdCancelar_Click(ByVal origen As Object, ByVal argumentos As System.Web.UI.ImageClickEventArgs)
        MyBase.cmdCancelar_Click(origen, argumentos)
        Cierra()
        actualizarPaneles()
    End Sub
 
    Protected Sub CargarListado(ByVal origen As Object, ByVal argumentos As RadListViewNeedDataSourceEventArgs) Handles rlvListado.NeedDataSource
        Dim filtro As String = String.Empty
        If hdFiltro IsNot Nothing AndAlso Not hdFiltro.Value.Equals(String.Empty) Then
            filtro = hdFiltro.Value
        End If
        CargarListado(filtro)
    End Sub
 
    Protected Overridable Sub CargarListado(ByVal FiltroDescripcion As String)
        ' Inserting some elements in the radlistview
        '
        'Dim lista As New List(Of ListItem)
        'lista.Add(New ListItem("Texto", "1"))
        'lista.Add(New ListItem("Text", "2"))
        'lista.Add(New ListItem("Contenido", "3"))
        'If FiltroDescripcion IsNot Nothing AndAlso Not FiltroDescripcion.Equals(String.Empty) Then
        '    lista = (From p In lista Where p.Text.ToUpper.Contains(FiltroDescripcion.ToUpper)).ToList
        'End If
        'rlvListado.DataSource = lista
 
        ' Inserting an empty list of items in the radlistview
        rlvListado.DataSource = New List(Of ListItem)
    End Sub
 
    Protected Overrides Sub Orden(ByVal origen As Object, ByVal argumentos As CommandEventArgs)
        MyBase.Orden(origen, argumentos)
        Select Case argumentos.CommandName
            Case "Select"
                rlvListado.InsertItemPosition = RadListViewInsertItemPosition.None
                actualizarPaneles()
            Case "InitInsert"
                MyBase.cmdNuevo_Click(origen, Nothing)
                rlvListado.SelectedIndexes.Clear()
                rlvListado.InsertItemPosition = InsertItemPosition.FirstItem
                actualizarPaneles()
        End Select
    End Sub
 
#Region " POSICIONAMIENTO LISTVIEW  "
 
    Protected Sub Nuevo()
        rlvListado.SelectedIndexes.Clear()
        rlvListado.InsertItemPosition = InsertItemPosition.FirstItem
    End Sub
 
    Protected Sub Cierra()
        CancelarCambios()
        rlvListado.SelectedIndexes.Clear()
        rlvListado.InsertItemPosition = InsertItemPosition.None
        hdIdRegistro.Value = ""
        VerSeccionDcha(False)
        actualizarPaneles()
    End Sub
 
    Protected Sub CambioSelect(ByVal origen As Object, ByVal argumentos As EventArgs)
        rlvListado.InsertItemPosition = InsertItemPosition.None
    End Sub
 
#End Region
 
    Protected Overridable Sub page_loadcomplete() Handles Me.LoadComplete
        If rlvListado.InsertItemPosition = RadListViewInsertItemPosition.LastItem Then
            rlvListado.InsertItemPosition = RadListViewInsertItemPosition.FirstItem
        End If
    End Sub
 
    Protected Sub hdIdRegistro_ValueChanged(ByVal origen As Object, ByVal argumentos As EventArgs) Handles hdIdRegistro.ValueChanged
        If hdIdRegistro.Value.Equals(String.Empty) Then
            CancelarCambios()
            rlvListado.SelectedIndexes.Clear()
            rlvListado.InsertItemPosition = InsertItemPosition.None
            VerSeccionDcha(False)
            actualizarPaneles()
        End If
    End Sub
 
    Protected Sub pruebaInsercion(ByVal origen As Object, ByVal argumentos As EventArgs) Handles rlvListado.ItemInserting, rlvListado.ItemInserted
        Dim parar As Boolean = True
    End Sub
End Class
Veli
Telerik team
 answered on 24 Aug 2010
1 answer
99 views
Hello,

Is it possible to drag RadGrid items to the RadListView control?

Thanks.
Rosen
Telerik team
 answered on 24 Aug 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?