ondelete error

3 posts, 1 answers
  1. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 25 May 2010 Link to this post

    hi
    im having this kind of error which i havent encountered in any other pages

    im going to attacht the error messagge and my codes
    <%@ Page Language="vb" AutoEventWireup="false" MasterPageFile="~/Main.Master" CodeBehind="NotificaDiVariazione.aspx.vb" Inherits="WebBIODemo.NotificaDiVariazione" %> 
    <%@ Register TagPrefix="wuc" TagName="pgModAnagUC" src="~/WUCnotifica/pgModAnag.ascx" %> 
    <%@ Register TagPrefix="wuc" TagName="pgModAttUC" src="~/WUCnotifica/pgModAtt.ascx" %> 
    <%@ Register TagPrefix="telerik" Namespace="Telerik.Web.UI" Assembly="Telerik.Web.UI" %> 
     
    <asp:Content ID="Content1" ContentPlaceHolderID="cphMain" Runat="Server">    
    <telerik:RadCodeBlock runat="server" ID="rdbScript"
        <!-- content start --> 
        <script type="text/javascript"
              var myWidth = 0myHeight = 0
               
              function setWH(){ 
                  if( typeof( window.innerWidth ) == 'number' ) { 
                    //Non-IE 
                    myWidth = window.innerWidth; 
                    myHeight = window.innerHeight; 
                  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) { 
                    //IE 6+ in 'standards compliant mode' 
                    myWidth = document.documentElement.clientWidth; 
                    myHeight = document.documentElement.clientHeight; 
                  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) { 
                    //IE 4 compatible 
                    myWidth = document.body.clientWidth; 
                    myHeight = document.body.clientHeight; 
                  }  
                   
                  myWidthmyWidth = myWidth * (90 / 100); 
                  myHeightmyHeight = myHeight * (90 / 100);  
                   
                  return [myWidth, myHeight];   
              }   
               
            function Set_Cookie(nomeCookie, value, expires, path, domain, secure ) 
            { 
                // set time, it's in milliseconds 
                var today = new Date(); 
                today.setTime( today.getTime() ); 
     
                if ( expires ) 
                { 
                expiresexpires = expires * 60 * 1000; 
                } 
                var expires_date = new Date( today.getTime() + (expires) ); 
     
                document.cookie = nomeCookie + "=" + unescape(value) + 
                ( ( expires ) ? ";expires=" + expires_date.toGMTString() : "" ) + 
                ( ( path ) ? ";path=" + path : "" ) + 
                ( ( domain ) ? ";domain=" + domain : "" ) + 
                ( ( secure ) ? ";secure" : "" ); 
            } 
                           
            function btnSearch(n){ 
                var combo = $find("<%= UFFICIO.ClientID %>"); 
                var value = combo.get_value(); 
                var id = document.getElementById("<%= ID.ClientID %>"); 
                             
                if(value == "" || value == null){ 
                    alert("Select Ufficio"); 
                    return false 
                };                         
                 
                if (n == "RappresentantiLegali_Ricerca" && (id.value == null || id.value == "")){ 
                    alert("Scegliere Prima il Dichiarante"); 
                    return false 
                }; 
                                        
     
                var v = setWH(); 
     
                var oWindow = radopen("CercaDichiarante.aspx?Uff=" + value + "&P=" + unescape(n), "rwdCerca"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            }  
             
            function EditDich(){ 
     
                var id = document.getElementById("<%= ID.ClientID %>"); 
                 
                if(id.value == "" || id.value == null){ 
                    alert("Manca il dichiarante"); 
                    return false 
                };                                             
     
                var v = setWH(); 
                 
                alert(id.value); 
     
                var oWindow = radopen("Dichiaranti.aspx?MMod=M&DA=C&id=" + id.value, "rwdCerca"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            }                 
             
            function getId(arg) 
            { 
                    var oArg = arg.split("|"); 
                     
                    if (oArg[1] == "D"){ 
                        var id = document.getElementById("<%= ID.ClientID %>");              
                        id.value = oArg[0]; 
                        var btn = document.getElementById("<%= btnDupNotif.ClientID %>"); 
                        btn.disabled = false
                    }  
                    if (oArg[1] == "R"){     
                        var r = document.getElementById("<%= IDRAPPRESENTANTE.ClientID %>");                  
                        r.value = oArg[0]; 
                    } 
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");                       
            }      
             
            function Rebind(arg){ 
                $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Refresh");  
            } 
                     
            function ShowUPOForm(){ 
                var txt = document.getElementById("<%= ID.ClientID %>"); 
                var combo = $find("<%= UFFICIO.ClientID %>"); 
                var value = combo.get_value();                
                var PR = null;         
                 
                if(txt.value == "" || txt.value == null){ 
                    alert("Scegliere prima il dichiarante"); 
                    return false 
                }; 
                PR = txt.value + "|" + value //+ "|" + P.checked + "|" + T.checked + "|" + I.checked + "|" + Z.checked + "|" + A.checked;                              
     
                var v = setWH(); 
     
                var oWindow = radopen("EditUnitaProduttiva.aspx?P=" + PR, "rwdUPO"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            } 
             
            function EditUPOForm(n){                                
     
                var v = setWH(); 
     
                var oWindow = radopen("EditUnitaProduttiva.aspx?ID=" + n, "rwdUPO"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            }  
             
            function EditRappr(n){                                
     
                var v = setWH(); 
     
                var oWindow = radopen("RappresentantiLegali.aspx?MMod=M&DA=C&id=" + n, "rwdUPO"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            }  
             
            function InsRappr(){                                
     
                var v = setWH(); 
     
                var oWindow = radopen("RappresentantiLegali.aspx?Mod=I&DA=C", "rwdUPO"); 
                oWindow.setSize (v[0], v[1]);   
                oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                oWindow.set_modal(true); 
                oWindow.center();  
                oWindow.set_status("");           
                return false;          
            }   
             
                function Insert(c,n) 
                { 
                   var rUrl; 
                   var p; 
                   var In = document.getElementById("<%= txtID.ClientID %>"); 
                   var combo; 
                   var value; 
                    
                    switch(c){ 
                        case "e": 
                            if (n == "" || n == null){ 
                                alert("Scegliere prima l'U.P.O."); 
                                return false                             
                            }; 
                            var IdD = $find("<%= txtIDDICHSCHEMA.ClientID %>"); 
                            p = n + "|" + In.value + "|" + IdD.get_value(); 
                            rUrl = "EditSezioneE.aspx?T=I&P=" + p 
                             
                            window.radopen(rUrl, "rwdInsEdit"); 
                            return false;    
                                                  
                            break; 
                        case "f": 
                            combo = $find("<%= lstIDUPOF.ClientID %>"); 
                            value = combo.get_value() 
                            if (value == "" || value == null){ 
                                alert("Scegliere prima l'U.P.O."); 
                                return false                             
                            };                       
                            p = combo.get_value() + "|" + In.value;  
                            rUrl = "EditSezioneF.aspx?P=" + p   
                             
                            var v = setWH(); 
                            var oWindow = radopen(rUrl, "rwdSezF"); 
                            oWindow.setSize (v[0], "600px");   
                            oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                            oWindow.set_modal(true); 
                            oWindow.center();  
                            oWindow.set_status("");                              
                            return false; 
                                                   
                            break;                                                                    
                    }             
                }    
                          
                function refreshGrid(arg) 
                { 
                 if(!arg) 
                 { 
                 $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("rebindSezioneE");             
                    } 
                    else 
                    { 
                 $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("rebindSezioneE");             
                    } 
                }     
                 
                function Edit(id, rowIndex, t) 
                { 
                   var In = document.getElementById("<%= txtID.ClientID %>"); 
                   var combo; 
                   var IdD = $find("<%= txtIDDICHSCHEMA.ClientID %>"); 
                   var rUrl; 
                 
                    var grid; 
                    switch(t){                         
                        case "F": 
                            grid = $find("<%= grdAppezz.ClientID %>"); 
                            combo = $find("<%= lstIDUPOF.ClientID %>"); 
                            rUrl = "EditSezioneF.aspx?Id=" + id;   
                             
                            var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); 
                            grid.get_masterTableView().selectItem(rowControl, true);                         
                             
                            var v = setWH(); 
                            var oWindow = radopen(rUrl, "rwdSezF"); 
                            oWindow.setSize (v[0], "600px");   
                            oWindow.set_behaviors(Telerik.Web.UI.WindowBehaviors.Move + Telerik.Web.UI.WindowBehaviors.Close + Telerik.Web.UI.WindowBehaviors.Reload); 
                            oWindow.set_modal(true); 
                            oWindow.center();  
                            oWindow.set_status("");                              
                            return false;                         
                             
                            break; 
                                                   
                    }                                         
                }    
                 
            function onBlur(sender, args){ 
                var boo = IsNumeric(sender.get_value()); 
                 
                if (boo == false){ 
                    alert("must be a numeric number"); 
                }             
            }  
                
            function IsNumeric(strString) 
               //  check for valid numeric strings   
               { 
               var strValidChars = "0123456789.-"
               var strChar; 
               var blnResult = true
     
               if (strString.length == 0) return false; 
     
               //  test strString consists of valid characters listed above 
               for (i = 0; i < strString.length && blnResult == true; i++) 
                  { 
                  strChar = strString.charAt(i); 
                  if (strValidChars.indexOf(strChar) == -1) 
                     { 
                     blnResult = false
                     } 
                  } 
               return blnResult; 
               } 
                
               function StrutturaInsMod(p, t){  
                    switch(t){ 
                        case "i":                        
                            if (p == "" || p == null){ 
                                alert("Scegliere prima l'U.P.O."); 
                                return false                             
                            }; 
                            var In = document.getElementById("<%= txtID.ClientID %>"); 
                            alert(In.value);                         
                            pp = p + "|" + In.value  
                            rUrl = "EditSezioneG.aspx?P=" + p                         
                            window.radopen(rUrl, "rwdInsEdit"); 
                            return false; 
                            break;  
                    } 
               }                                        
        </script>                 
    </telerik:RadCodeBlock> 
     
    <telerik:RadFormDecorator ID="RadFormDecorator1" runat="server" DecoratedControls="All" EnableRoundedCorners="false"  /> 
     
    <telerik:RadWindowManager ID="rwmZoom" runat="server" Behavior="Close,Move" InitialBehaviors="None" ReloadOnShow="true" VisibleStatusbar="false"
        <Windows> 
            <telerik:RadWindow ID="rwdInsEdit" runat="server" Animation="Resize" Width="650px" Height="600px" Modal="true" Behaviors="close,Move,Reload" 
                VisibleStatusbar="false"
            </telerik:RadWindow> 
        </Windows> 
    </telerik:RadWindowManager> 
     
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1"
        <AjaxSettings>    
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="ucModAnag" /> 
                    <telerik:AjaxUpdatedControl ControlID="ucVal" /> 
                    <telerik:AjaxUpdatedControl ControlID="ucModAtt" /> 
                    <telerik:AjaxUpdatedControl ControlID="grdDich" /> 
                    <telerik:AjaxUpdatedControl ControlID="txtIDDICHSCHEMA" /> 
                    <telerik:AjaxUpdatedControl ControlID="txtID" /> 
                    <telerik:AjaxUpdatedControl ControlID="ID" /> 
                    <telerik:AjaxUpdatedControl ControlID="lblErrorMsg" /> 
                    <telerik:AjaxUpdatedControl ControlID="IDDICHSCHEMA" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>  
            <telerik:AjaxSetting AjaxControlID="grdValutazione"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdValutazione" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>             
            <telerik:AjaxSetting AjaxControlID="lstIDUPOF"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdAppezz" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting>                     
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="grdAppezz" />      
                </UpdatedControls> 
            </telerik:AjaxSetting>                                                                  
        </AjaxSettings>     
    </telerik:RadAjaxManager> 
    <div style="position:absolute; left:500px; top:255px"
        <telerik:RadAjaxLoadingPanel  ID="RadAjaxLoadingPanel1" runat="server" Skin="" Transparency="30" IsSticky="true"
            <asp:Image  ID="Image1" runat="server" ImageUrl="~/_img/status.gif" AlternateText="loading" /> 
        </telerik:RadAjaxLoadingPanel> 
    </div>     
    <telerik:RadAjaxPanel runat="server" ID="rapPanel" LoadingPanelID="RadAjaxLoadingPanel1">          
    <div style="height:100%"
     
                <center> 
                <asp:HiddenField runat="server" ID="IDDICHSCHEMA" /> 
                <div style="display:none"
                    <asp:Button runat="server" ID="btnGetIDdichSchema" /> 
                    <telerik:RadTextBox runat="server" ID="txtID" /> 
                    <telerik:RadTextBox runat="server" ID="IDNOTIFICAP" /> 
                    <asp:TextBox runat="server" ID="ID" /> 
                    <telerik:RadTextBox runat="server" ID="txtIDDICHSCHEMA" /> 
                    <asp:TextBox runat="server" ID="txtORGANISMO" Text="ICA" /> 
                    <asp:TextBox runat="server" ID="txtTIPO" Text="1" /> 
                    <asp:TextBox runat="server" ID="IDRAPPRESENTANTE" /> 
                    <asp:TextBox runat="server" ID="ModeT" Text="I" /> 
                </div> 
                <table width="100%" align="center" cellpadding="0" cellspacing="0"
                    <tr> 
                        <td align="right"><asp:Label runat="server" ID="lblDTCOMPILAZIONE" Text="Data Compilazione: " /></td
                        <td align="left"
                            <telerik:RadDatePicker ID="rdpDTCOMPILAZIONE" runat="server" Culture="Italian (Italy)" Width="150px" MinDate="01/01/1900" MaxDate="12/31/2100"
                                <Calendar ID="calDT" runat="server" Width="160px"></Calendar> 
                                <DateInput ID="DateInput1" runat="server" DateFormat="d/M/yyyy" ></DateInput
                            </telerik:RadDatePicker > 
                        </td> 
                        <td align="right"><asp:Label runat="server" ID="lblDTPROTOCOLLO" Text="Data Protocollo: " /></td
                        <td align="left"
                            <telerik:RadDatePicker ID="rdpDTPROTOCOLLO" runat="server" Culture="Italian (Italy)" Width="150px" MinDate="01/01/1900" MaxDate="12/31/2100"
                                <Calendar ID="Calendar1" runat="server" Width="160px"></Calendar> 
                                <DateInput ID="DateInput2" runat="server" DateFormat="d/M/yyyy" ></DateInput
                            </telerik:RadDatePicker >                         
                        </td> 
                    </tr> 
                    <tr> 
                        <td align="right"><asp:Label runat="server" ID="lblUFFICIO" Text="Ufficio: " /></td
                        <td align="left"
                            <telerik:RadComboBox ID="UFFICIO" runat="server" AppendDataBoundItems="true" EmptyMessage="No Record" AutoPostBack="true"
                                <Items> 
                                    <telerik:RadComboBoxItem Value="" Text="Not Defined" /> 
                                </Items> 
                            </telerik:RadComboBox> 
                        </td> 
                        <td align="right"><asp:Label runat="server" ID="lblPROTOCOLLO" Text="Protocollo: " /></td
                        <td align="left"><telerik:RadNumericTextBox runat="server" ID="txtPROTOCOLLO" NumberFormat-DecimalDigits="0" EmptyMessage="N° protocollo" /></td
                    </tr> 
                </table> 
                    <table width="100%" align="center" cellpadding="0" cellspacing="0"
                        <tr>                         
                            <th colspan="2"><h5><asp:Label runat="server" ID="lblDichiarante" Text="Dichiarante" /></h5></th> 
                        </tr> 
                        <tr> 
                            <td>                             
                                  <asp:Button runat="server" ID="btnDupNotif" Text="Duplica l'ultima notifica" OnClientClick="if(!confirm('Vuoi duplicare ultima notifica del dichiarante?')) return false;" /> 
                            </td>                     
                        </tr> 
                        <tr> 
                            <th class="subTitleCell"
                                <onclick="btnSearch('Dichiaranti_Ricerca'); return false;"
                                    <img src="_img/Lens.gif" alt="search" /> 
                                    <asp:label runat="server" ID="lblCercaD" Text="Cerca Dichiarante" /> 
                                </a> 
                            </th> 
                            <th class="subTitleCell"
                                <onclick="EditDich(); return false;"
                                    <img src="_img/Editor.gif" alt="search" /> 
                                    <asp:label runat="server" ID="lblEditD" Text="Edit Dati Dichiarante" /> 
                                </a>                                                          
                            </th> 
                        </tr>                      
                        <tr> 
                            <td colspan="2"
                                <telerik:RadGrid ID="grdDich" runat="server" 
                                     AllowAutomaticUpdates="true" ShowHeader="true" BorderWidth="0" 
                                    GridLines="Horizontal" AllowPaging="True" AllowSorting="True" AutoGenerateColumns="False"  
                                    ShowStatusBar="true" Width="99%">                             
                                    <MasterTableView DataKeyNames="ID" Width="100%" CommandItemDisplay="None"
                                        <Columns>    
                                            <telerik:GridBoundColumn ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left" HeaderText="Denominazione" DataField="DENOMINAZIONE" SortExpression="DENOMINAZIONE" UniqueName="colDENOMINAZIONE"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn ItemStyle-VerticalAlign="Middle" ItemStyle-HorizontalAlign="Left" HeaderText="Nome" DataField="NOME" SortExpression="NOME" UniqueName="colNOME"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn HeaderText="Codice Fiscale" DataField="CODFISCALE" SortExpression="CODFISCALE" UniqueName="colCODICEFISCALE"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn HeaderText="Partita Iva" DataField="PARTITAIVA" SortExpression="PARTITAIVA" UniqueName="colPARTITAIVA"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn HeaderText="Indirizzo" DataField="INDIRIZZO" SortExpression="INDIRIZZO" UniqueName="colINDIRIZZO"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn HeaderText="Localita" DataField="LOCALITA" SortExpression="LOCALITA" UniqueName="colLOCALITA"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn HeaderText="Prov" DataField="PROVINCIA" SortExpression="PROVINCIA" UniqueName="colPROVINCIA_Descr"></telerik:GridBoundColumn> 
                                        </Columns> 
                                    </MasterTableView> 
                                </telerik:RadGrid>                         
                            </td> 
                        </tr> 
                        <tr> 
                            <td colspan="2">&nbsp;</td> 
                        </tr> 
                    </table> 
            <div> 
                <div style="width:250px; float:left"
                    <table width="100%" align="center" cellpadding="0" cellspacing="0"
                        <tr> 
                            <td style="width:250px"
                                <telerik:RadPanelBar runat="server" ID="rpbNotifica" Visible="false"
                                    <Items> 
                                        <telerik:RadPanelItem Text="Modifica Dati Anagrafici" Value="D" /> 
                                        <telerik:RadPanelItem Text="Modifica Attività" Value="A"
                                        </telerik:RadPanelItem> 
                                        <telerik:RadPanelItem Text="Variazione Supefici" Value="S"
                                        </telerik:RadPanelItem>     
                                        <telerik:RadPanelItem Text="Modifica Appezzamenti" Value="A" />                                           
                                    </Items> 
                                </telerik:RadPanelBar>                     
                            </td> 
                        </tr> 
                    </table> 
                </div> 
                <div style="float:right"
                    <table width="100%" align="center" cellpadding="0" cellspacing="0"
                        <tr> 
                            <td> 
                                <telerik:RadTabStrip ID="rtsNotifica" runat="server" SelectedIndex="0" MultiPageID="rmpNotifica"
                                    <Tabs> 
                                        <telerik:RadTab runat="server" Value="T" Text="Testata" PageViewID="pgTestata"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="E" Text="Particelle" PageViewID="pgVal"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="F" Text="Appezzamenti" PageViewID="pgApp"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="G" Text="Strutture Aziendali" PageViewID="pgAzienda"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="M" Text="Anagrafica" PageViewID="pgModAnag"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="N" Text="Attività" PageViewID="pgModAtt"></telerik:RadTab> 
                                    </Tabs> 
                                </telerik:RadTabStrip>                         
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
        <telerik:RadMultiPage ID="rmpNotifica" runat="server" SelectedIndex="0"
            <telerik:RadPageView ID="pgTestata" runat="server"></telerik:RadPageView>                                          
             
            <telerik:RadPageView ID="pgVal" runat="server"
                <div style="height:100%"
                    <table width="100%" cellpadding="0" cellspacing="0"
                        <tr> 
                            <td> 
                                <telerik:RadTabStrip ID="rtsModPart" runat="server" SelectedIndex="0" MultiPageID="rmpModPart"
                                    <Tabs> 
                                        <telerik:RadTab runat="server" Value="T" Text="" PageViewID="pgTestata" Visible="false"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="A" Text="Aggiunta Particelle" PageViewID="pgVal"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="E" Text="Elimina Particelle" PageViewID="pgVal"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="C" Text="Accorpamento Particelle" PageViewID="pgVal"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="F" Text="Frazionamento Particelle" PageViewID="pgVal"></telerik:RadTab> 
                                        <telerik:RadTab runat="server" Value="S" Text="Modifica Superfici" PageViewID="pgVal"></telerik:RadTab>                                                                    
                                    </Tabs> 
                                </telerik:RadTabStrip> 
                            </td> 
                        </tr> 
                        <tr> 
                            <td> 
                                <telerik:RadMultiPage ID="rmpModPart" runat="server" SelectedIndex="0"
                                    <telerik:RadPageView ID="RadPageView1" runat="server"></telerik:RadPageView>                                          
                                     
                                    <telerik:RadPageView ID="RadPageView2" runat="server"
                                        <div style="display:none">                 
                                            <asp:TextBox runat="server" ID="txtIDNOTIFICAE" />           
                                        </div> 
                                     
                                        <div> 
                                            <table width="100%" align="center" cellpadding="0" cellspacing="0"
                                                <tr> 
                                                    <td>&nbsp;</td> 
                                                </tr>                 
                                                <tr> 
                                                    <th align="right"><asp:Label runat="server" ID="lblIDUPOE" Text="U.P.O " /></th
                                                    <th align="left" style="padding-left:30px"
                                                        <telerik:RadComboBox runat="server" id="lstIDUPOE" AppendDataBoundItems="true" AutoPostBack="true" ZIndex="5"
                                                        </telerik:RadComboBox> 
                                                    </th> 
                                                </tr> 
                                                <tr> 
                                                    <td colspan="2" class="subTitleCell">&nbsp;</td> 
                                                </tr> 
                                                <tr> 
                                                    <td colspan="2">&nbsp;</td> 
                                                </tr>                     
                                                <tr> 
                                                    <th colspan="2" class="subTitleCell"><style="font-size:14px">INFORMAZIONI RELATIVE ALLA SUPERFICIE AGRICOLA UTILIZZATA AZIENDALE</b></th
                                                </tr> 
                                                <tr> 
                                                    <td colspan="2">&nbsp;</td> 
                                                </tr> 
                                                <tr> 
                                                    <th> 
                                                        <asp:HyperLink runat="server" ID="btnPart"
                                                            <img src="../_img/Insert.gif" alt="aggiungi" /> 
                                                            <asp:label runat="server" ID="Label1" Text="Aggiungi" /> 
                                                        </asp:HyperLink> 
                                                    </th> 
                                                    <td> 
                                                        <asp:ImageButton runat="server" ID="btnVis" ImageUrl="" /> 
                                                    </td> 
                                                </tr>                                                            
                                                <tr> 
                                                    <td colspan="2"
                                                        <telerik:RadGrid ID="grdValutazione" runat="server" GridLines="None" 
                                                            AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False" 
                                                            ShowStatusBar="true" AllowAutomaticDeletes="True"
                                                            <MasterTableView CommandItemDisplay="none" GridLines="None" 
                                                                DataKeyNames="IDPAP,IDAPPEZZAMENTO,IDPARTICELLA,kiave" AllowFilteringByColumn="False" AllowSorting="True"
                                                                <Columns>                          
                                                                    <telerik:GridTemplateColumn UniqueName="colPulsante"
                                                                        <ItemTemplate> 
                                                                            <asp:ImageButton runat="server" ID="btnT" ImageUrl="" /> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn> 
                                                                    <telerik:GridButtonColumn ConfirmText="Sei sicuro di voler eliminare la riga?" ButtonType="ImageButton" ImageUrl="../_img/Delete.gif" CommandName="Delete" Text="Elimina" UniqueName="colDelete"
                                                                        <HeaderStyle Width="20px" /> 
                                                                    </telerik:GridButtonColumn>                                                                  
                                                                    <telerik:GridTemplateColumn> 
                                                                        <HeaderTemplate> 
                                                                            <table id="Table1" style="width: 100%"
                                                                                <tr> 
                                                                                    <td colspan="2" align="center"
                                                                                        <b>Codice Istat</b> 
                                                                                    </td> 
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td style="width: 50%"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnProv" Text="Prov" ToolTip="Sort by Provincia" 
                                                                                        CommandName='Sort' CommandArgument='PROVINCIAPARTICELLA' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 50%"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnCom" Text="Comune" ToolTip="Sort by Comune" 
                                                                                        CommandName='Sort' CommandArgument='COMUNEPARTICELLA' runat="server" /> 
                                                                                    </td> 
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 50%"
                                                                                        <%#Eval("PROVINCIAPARTICELLA")%> 
                                                                                    </td> 
                                                                                    <td style="width: 50%"
                                                                                        <%#Eval("COMUNEPARTICELLA")%> 
                                                                                    </td> 
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                        <ItemStyle HorizontalAlign="Center" /> 
                                                                    </telerik:GridTemplateColumn> 
                                                                    <telerik:GridTemplateColumn> 
                                                                        <HeaderTemplate> 
                                                                            <table id="Table2" style="width: 100%"
                                                                                <tr> 
                                                                                    <td colspan="4" align="center"
                                                                                        <b>RIFERIMENTI CATASTALI</b> 
                                                                                    </td> 
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td style="width: 15%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnSez" Text="Sez" ToolTip="Sort by Sezione" 
                                                                                        CommandName='Sort' CommandArgument='SEZIONE' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 25%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnFoglio" Text="Foglio" ToolTip="Sort by Foglio" 
                                                                                        CommandName='Sort' CommandArgument='FOGLIO' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 45%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnPart" Text="Particella" ToolTip="Sort by Particella" 
                                                                                        CommandName='Sort' CommandArgument='PARTICELLA' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 15%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnSub" Text="Sub" ToolTip="Sort by Sub" 
                                                                                        CommandName='Sort' CommandArgument='SUB' runat="server" /> 
                                                                                    </td>                                                         
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 15%" align="center"
                                                                                        <%#Eval("SEZIONE")%> 
                                                                                    </td> 
                                                                                    <td style="width: 25%" align="center"
                                                                                        <%#Eval("FOGLIO")%> 
                                                                                    </td> 
                                                                                    <td style="width: 45%" align="center"
                                                                                        <%#Eval("PARTICELLA")%> 
                                                                                    </td> 
                                                                                    <td style="width: 15%" align="center"
                                                                                        <%#Eval("SUB")%> 
                                                                                    </td>                                                         
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate>                                          
                                                                    </telerik:GridTemplateColumn> 
                                                                    <telerik:GridTemplateColumn> 
                                                                       <HeaderTemplate> 
                                                                            <table id="Table3" style="width: 100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnTitP" Text="Titolo<br />Poss." ToolTip="Sort by Titolo possesso" 
                                                                                        CommandName='Sort' CommandArgument='TITOLOPOSSESSO' runat="server" /> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <%#Eval("TITOLOPOSSESSO")%> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn> 
                                                                    <telerik:GridTemplateColumn> 
                                                                        <HeaderTemplate> 
                                                                            <table style="width: 100%"
                                                                                <tr> 
                                                                                    <td colspan="2" align="center"
                                                                                        <b>SUP. CATASTALE</b> 
                                                                                    </td> 
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td style="width: 50%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnHA1" Text="ha" ToolTip="Sort by HA" 
                                                                                        CommandName='Sort' CommandArgument='HA1' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 50%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnARE1" Text="are" ToolTip="Sort by Are" 
                                                                                        CommandName='Sort' CommandArgument='ARE1' runat="server" /> 
                                                                                    </td>                                                  
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 50%"
                                                                                        <%#Eval("HA1")%> 
                                                                                    </td> 
                                                                                    <td style="width: 50%"
                                                                                        <%#Eval("ARE1")%> 
                                                                                    </td>                                                
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                        <ItemStyle HorizontalAlign="Center" /> 
                                                                    </telerik:GridTemplateColumn>     
                                                                    <telerik:GridTemplateColumn> 
                                                                        <HeaderTemplate> 
                                                                            <table style="width: 100%"
                                                                                <tr> 
                                                                                    <td colspan="6" align="center"
                                                                                        <b>SUPERFICIE IN BASE AL METODO DI PRODUZIONE</b> 
                                                                                    </td> 
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td colspan="2" align="center"
                                                                                        convenzionale 
                                                                                    </td> 
                                                                                    <td colspan="2" align="center"
                                                                                        biologico 
                                                                                    </td>    
                                                                                    <td colspan="2" align="center"
                                                                                        in conversione 
                                                                                    </td>                                                                                                          
                                                                                </tr> 
                                                                                <tr> 
                                                                                    <td style="width: 17%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnHA2" Text="ha" ToolTip="Sort by HA" 
                                                                                        CommandName='Sort' CommandArgument='HA2' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 17%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnARE2" Text="are" ToolTip="Sort by Are" 
                                                                                        CommandName='Sort' CommandArgument='ARE2' runat="server" /> 
                                                                                    </td>  
                                                                                    <td style="width: 17%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnHA3" Text="ha" ToolTip="Sort by HA" 
                                                                                        CommandName='Sort' CommandArgument='HA3' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 17%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnARE3" Text="are" ToolTip="Sort by Are" 
                                                                                        CommandName='Sort' CommandArgument='ARE3' runat="server" /> 
                                                                                    </td>  
                                                                                    <td style="width: 17%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnHA4" Text="ha" ToolTip="Sort by HA" 
                                                                                        CommandName='Sort' CommandArgument='HA4' runat="server" /> 
                                                                                    </td> 
                                                                                    <td style="width: 15%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnARE4" Text="are" ToolTip="Sort by Are" 
                                                                                        CommandName='Sort' CommandArgument='ARE4' runat="server" /> 
                                                                                    </td>                                                                                                                                                                  
                                                                                </tr>                                                     
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 17%"
                                                                                        <%#Eval("HA2")%> 
                                                                                    </td> 
                                                                                    <td style="width: 17%"
                                                                                        <%#Eval("ARE2")%> 
                                                                                    </td>      
                                                                                    <td style="width: 17%"
                                                                                        <%#Eval("HA3")%> 
                                                                                    </td> 
                                                                                    <td style="width: 17%"
                                                                                        <%#Eval("ARE3")%> 
                                                                                    </td>      
                                                                                    <td style="width: 17%"
                                                                                        <%#Eval("HA4")%> 
                                                                                    </td> 
                                                                                    <td style="width: 15%"
                                                                                        <%#Eval("ARE4")%> 
                                                                                    </td>                                                                                                                                                                
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                        <ItemStyle HorizontalAlign="Center" /> 
                                                                    </telerik:GridTemplateColumn> 
                                                                    <telerik:GridTemplateColumn> 
                                                                       <HeaderTemplate> 
                                                                            <table id="Table4" style="width: 100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnIDA" Text="N° Appezzamento" ToolTip="Sort by Idappezzamento" 
                                                                                        CommandName='Sort' CommandArgument='IDAPPEZZAMENTO' runat="server" /> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <%#Eval("IDAPPEZZAMENTO")%> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn>                                          
                                                                    <telerik:GridTemplateColumn> 
                                                                       <HeaderTemplate> 
                                                                            <table id="Table5" style="width: 100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnOrien" Text="Orientamento" ToolTip="Sort by orientamento" 
                                                                                        CommandName='Sort' CommandArgument='ORIENTAMENTO1' runat="server" /> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <%#Eval("ORIENTAMENTO1")%> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn>     
                                                                    <telerik:GridTemplateColumn> 
                                                                       <HeaderTemplate> 
                                                                            <table id="Table6" style="width: 100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnSpe" Text="Specie" ToolTip="Sort by Specie" 
                                                                                        CommandName='Sort' CommandArgument='PSPECIE' runat="server" /> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <%#Eval("PSPECIE")%> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn>   
                                                                    <telerik:GridTemplateColumn> 
                                                                       <HeaderTemplate> 
                                                                            <table id="Table7" style="width: 100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <asp:LinkButton CssClass="Button" ID="btnVar" Text="Varietà" ToolTip="Sort by Varieta" 
                                                                                        CommandName='Sort' CommandArgument='PVARIETA' runat="server" /> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </HeaderTemplate> 
                                                                        <ItemTemplate> 
                                                                            <table cellspacing="0" width="100%"
                                                                                <tr> 
                                                                                    <td style="width: 100%" align="center"
                                                                                        <%#Eval("PVARIETA")%> 
                                                                                    </td>                                                        
                                                                                </tr> 
                                                                            </table> 
                                                                        </ItemTemplate> 
                                                                    </telerik:GridTemplateColumn>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           
                                                                </Columns> 
                                                            </MasterTableView> 
                                                        </telerik:RadGrid>                       
                                                    </td> 
                                                </tr>                     
                                            </table> 
                                        </div>          
                                    </telerik:RadPageView> 
                                </telerik:RadMultiPage> 
                            </td> 
                        </tr> 
                    </table>   
                </div> 
            </telerik:RadPageView> 
             
            <telerik:RadPageView ID="pgApp" runat="server"
                <div style="display:none">                 
                    <asp:TextBox runat="server" ID="txtIDNOTIFICAF" />           
                </div> 
             
                <div> 
                    <table width="100%" align="center" cellpadding="0" cellspacing="0"
                        <tr> 
                            <td>&nbsp;</td> 
                        </tr>                 
                        <tr> 
                            <th align="right"><asp:Label runat="server" ID="lblIDUPOF" Text="U.P.O " /></th
                            <th align="left" style="padding-left:30px"
                                <telerik:RadComboBox runat="server" id="lstIDUPOF" AppendDataBoundItems="true" AutoPostBack="true" ZIndex="6"
                                    <Items> 
                                    </Items> 
                                </telerik:RadComboBox> 
                            </th> 
                        </tr> 
                        <tr> 
                            <td colspan="2" class="subTitleCell">&nbsp;</td> 
                        </tr> 
                        <tr> 
                            <td colspan="2">&nbsp;</td> 
                        </tr>                     
                        <tr> 
                            <th colspan="2" class="subTitleCell"><style="font-size:14px"><asp:Label runat="server" ID="lblTitoloSF" Text="INFORMAZIONI RELATIVE AGLI APPEZZAMENTI AZIENDALI" /></b></th> 
                        </tr> 
                        <tr> 
                            <td colspan="2">&nbsp;</td> 
                        </tr> 
                        <tr> 
                            <th colspan="2"
                                <a> 
                                    <img src="_img/Insert.gif" alt="aggiungi" /> 
                                    <asp:label runat="server" ID="Label3" Text="Aggiungi" /> 
                                </a> 
                            </th> 
                        </tr>                                                            
                        <tr> 
                            <td colspan="2"
                                <telerik:RadGrid ID="grdAppezz" runat="server" GridLines="None" 
                                    AllowPaging="True" PageSize="20" AllowSorting="True" AutoGenerateColumns="False" 
                                    ShowStatusBar="true" AllowAutomaticDeletes="True" AllowAutomaticInserts="True" 
                                    AllowAutomaticUpdates="True"
                                    <MasterTableView CommandItemDisplay="none" GridLines="None" 
                                        DataKeyNames="KIAVE" AllowFilteringByColumn="False" AllowSorting="True" Name="Master"
                                        <Columns> 
                                            <telerik:GridTemplateColumn> 
                                                <ItemTemplate> 
                                                    <asp:ImageButton runat="server" ID="btnEdit" ImageUrl="~/_img/Editor.gif" /> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn> 
                                                <HeaderTemplate> 
                                                    <table id="Table1" style="width: 100%"
                                                        <tr> 
                                                            <td style="width: 100%"
                                                                <asp:LinkButton CssClass="Button" ID="btnAPP" Text="N° App." ToolTip="Sort by N° Appezzamento" 
                                                                CommandName='Sort' CommandArgument='IDUPO' runat="server" /> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </HeaderTemplate> 
                                                <ItemTemplate> 
                                                    <table cellspacing="0" width="100%"
                                                        <tr> 
                                                            <td style="width: 100%"
                                                                <%#Eval("IDAPPEZZAMENTO")%> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </ItemTemplate> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridTemplateColumn> 
                                                <HeaderTemplate> 
                                                    <table id="Table1" style="width: 100%"
                                                        <tr> 
                                                            <td colspan="2" align="center"
                                                                <b>Codice Istat</b> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td style="width: 50%"
                                                                <asp:LinkButton CssClass="Button" ID="btnProv" Text="Prov" ToolTip="Sort by Provincia" 
                                                                CommandName='Sort' CommandArgument='PROVINCIA' runat="server" /> 
                                                            </td> 
                                                            <td style="width: 50%"
                                                                <asp:LinkButton CssClass="Button" ID="btnCom" Text="Comune" ToolTip="Sort by Comune" 
                                                                CommandName='Sort' CommandArgument='COMUNE' runat="server" /> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </HeaderTemplate> 
                                                <ItemTemplate> 
                                                    <table cellspacing="0" width="100%"
                                                        <tr> 
                                                            <td style="width: 50%"
                                                                <%#Eval("PROVINCIA")%> 
                                                            </td> 
                                                            <td style="width: 50%"
                                                                <%#Eval("COMUNE")%> 
                                                            </td> 
                                                        </tr> 
                                                    </table> 
                                                </ItemTemplate> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn>                                    
                                            <telerik:GridTemplateColumn> 
                                                <HeaderTemplate> 
                                                    <table style="width: 100%"
                                                        <tr> 
                                                            <td colspan="3" align="center"
                                                                <b>SUP. CATASTALE</b> 
                                                            </td> 
                                                        </tr> 
                                                        <tr> 
                                                            <td style="width: 34%" align="center"
                                                                <asp:LinkButton CssClass="Button" ID="btnHA1" Text="ha" ToolTip="Sort by HA" 
                                                                CommandName='Sort' CommandArgument='HA1' runat="server" /> 
                                                            </td> 
                                                            <td style="width: 33%" align="center"
                                                                <asp:LinkButton CssClass="Button" ID="btnARE1" Text="are" ToolTip="Sort by Are" 
                                                                CommandName='Sort' CommandArgument='ARE1' runat="server" /> 
                                                            </td>   
                                                            <td style="width: 33%" align="center"
                                                                <asp:LinkButton CssClass="btnCRE1" ID="LinkButton1" Text="cre" ToolTip="Sort by cre" 
                                                                CommandName='Sort' CommandArgument='CRE1' runat="server" /> 
                                                            </td>                                                                                                          
                                                        </tr> 
                                                    </table> 
                                                </HeaderTemplate> 
                                                <ItemTemplate> 
                                                    <table cellspacing="0" width="100%"
                                                        <tr> 
                                                            <td style="width: 34%"
                                                                <%#Eval("HA1")%> 
                                                            </td> 
                                                            <td style="width: 33%"
                                                                <%#Eval("ARE1")%> 
                                                            </td>   
                                                            <td style="width: 33%"
                                                                <%#Eval("CRE1")%> 
                                                            </td>                                                                                                        
                                                        </tr> 
                                                    </table> 
                                                </ItemTemplate> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridBoundColumn DataField="METODOPRODDICHIARATO" HeaderText="Metodo" SortExpression="METODOPRODDICHIARATO"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="DTCESSAZIONECONV" HeaderText="Data Cessato" SortExpression="DTCESSAZIONECONV" DataFormatString="{0: dd/MM/yyyy}"
                                            </telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn> 
                                                <HeaderTemplate> 
                                                    <table style="width: 100%"
                                                        <tr> 
                                                            <td style="width: 100%" align="center"
                                                                <asp:LinkButton CssClass="Button" ID="btnOrient" Text="Orientamenti" ToolTip="Sort by Orientamenti" 
                                                                CommandName='Sort' CommandArgument='ORIENTAMENTO1' runat="server" /> 
                                                            </td>                                                                                                      
                                                        </tr> 
                                                    </table> 
                                                </HeaderTemplate> 
                                                <ItemTemplate> 
                                                    <table cellspacing="0" width="100%"
                                                        <tr> 
                                                            <td style="width: 25%"
                                                                <%#Eval("ORIENTAMENTO1")%> 
                                                            </td> 
                                                            <td style="width: 25%"
                                                                <%#Eval("ORIENTAMENTO2")%> 
                                                            </td>   
                                                            <td style="width: 25%"
                                                                <%#Eval("ORIENTAMENTO3")%> 
                                                            </td>   
                                                            <td style="width: 25%"
                                                                <%#Eval("ORIENTAMENTO4")%> 
                                                            </td>                                                                                                                                                                
                                                        </tr> 
                                                    </table> 
                                                </ItemTemplate> 
                                                <ItemStyle HorizontalAlign="Center" /> 
                                            </telerik:GridTemplateColumn>                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     
                                        </Columns> 
                                        <DetailTables> 
                                            <telerik:GridTableView AutoGenerateColumns="false" Caption="Particella Appezzamenti" AllowSorting="false" 
                                               Width="100%" Name="Dettaglio" DataSourceID="objDSP"
                                                <ParentTableRelation> 
                                                    <telerik:GridRelationFields DetailKeyField="KIAVE" MasterKeyField="KIAVE" /> 
                                                </ParentTableRelation> 
                                                <PagerStyle AlwaysVisible="false" />                                             
                                                <Columns> 
                                                    <telerik:GridBoundColumn SortExpression="Part" HeaderText="Part." DataField="Part" UniqueName="colParticella"
                                                    </telerik:GridBoundColumn>                                                      
                                                    <telerik:GridBoundColumn SortExpression="SUPERFICIECONVENZ" HeaderText="Sup. Convenzionale" DataField="SUPERFICIECONVENZ" UniqueName="colSUPERFICIECONVENZ"
                                                    </telerik:GridBoundColumn> 
                                                    <telerik:GridBoundColumn SortExpression="SUPERFICIEBIO" HeaderText="Sup. Biologico" DataField="SUPERFICIEBIO" UniqueName="colSUPERFICIEBIO"
                                                    </telerik:GridBoundColumn>    
                                                    <telerik:GridBoundColumn SortExpression="SUPERFICIECONVERS" HeaderText="Sup. In Converzione" DataField="SUPERFICIECONVERS" UniqueName="colSUPERFICIECONVERS"
                                                    </telerik:GridBoundColumn>                                      
                                                </Columns> 
                                            </telerik:GridTableView> 
                                        </DetailTables>                                      
                                    </MasterTableView>                                
                                </telerik:RadGrid>                       
                            </td> 
                        </tr>                     
                    </table> 
                </div>    
            </telerik:RadPageView>              
             
            <telerik:RadPageView ID="pgModAnag" runat="server"
               <wuc:pgModAnagUC runat="server" ID="ucModAnag" /> 
            </telerik:RadPageView> 
             
            <telerik:RadPageView ID="pgModAtt" runat="server"
                <wuc:pgModAttUC ID="ucModAtt" runat="server" /> 
            </telerik:RadPageView>         
                                                                                              
        </telerik:RadMultiPage>                         
                            </td> 
                        </tr> 
                    </table> 
                </div> 
            </div> 
                </center> 
                
         
         
     
         
        <table width="90%" align="center" class="tbContorno" border="0"
        <tr><td colspan="2">&nbsp;</td></tr>             
        <tr> 
            <td colspan="2"><asp:Label runat="server" ID="lblErrorMsg" Text="" CssClass="ErrMsg"></asp:Label></td
        </tr>     
    </table> 
    <div style="display:none"
        <asp:TextBox runat="server" ID="TabSelectedPrev" Text="T" /> 
        <asp:TextBox runat="server" ID="EventArgs" /> 
        <asp:TextBox runat="server" ID="p" /> 
        <asp:TextBox runat="server" ID="c" /> 
        <asp:TextBox runat="server" ID="ItemIndex" /> 
        <asp:TextBox runat="server" ID="ControlName" /> 
        <asp:TextBox runat="server" ID="IndexP" /> 
        <asp:TextBox runat="server" ID="IndexS" /> 
        <asp:Button runat="server" ID="btnPostBackEvent" /> 
    </div> 
    </div>    
    </telerik:RadAjaxPanel> 
    <asp:ObjectDataSource   
        ID="objDSRappr"   
        runat="server"   
        SelectMethod="selectRapprLegal" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="NotificheTestata_RicercaRapprLegal" Direction="Input" Type="String" /> 
            <asp:Parameter Name="filterby" DefaultValue="" Type="String" Direction="Input" /> 
        </SelectParameters>  
    </asp:ObjectDataSource> 
    <asp:ObjectDataSource   
        ID="objDSDich"   
        runat="server"   
        SelectMethod="selectRapprLegal" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="Dichiaranti_Ricerca" Direction="Input" Type="String" /> 
            <asp:Parameter Name="filterby" DefaultValue="" Type="String" Direction="Input" /> 
        </SelectParameters>  
    </asp:ObjectDataSource>   
    <asp:ObjectDataSource   
        ID="objDSUPO"   
        runat="server"   
        SelectMethod="selectRapprLegal" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="NotificheTestata_RicercaUPO" Direction="Input" Type="String" /> 
            <asp:Parameter Name="filterby" DefaultValue="" Type="String" Direction="Input" /> 
        </SelectParameters>  
    </asp:ObjectDataSource>  
        
    <asp:ObjectDataSource   
        ID="objDSM"   
        runat="server"   
        SelectMethod="SelectRapprLegal" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="Appezzamenti_Ricerca" Direction="Input" Type="String" /> 
            <asp:Parameter Name="filterBy" Type="String" /> 
        </SelectParameters>  
    </asp:ObjectDataSource>    
    <asp:ObjectDataSource   
        ID="objDSP"   
        runat="server"   
        SelectMethod="SelectParticellaApp" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="ParticelleAppezzamenti_Ricerca" Direction="Input" Type="String" /> 
            <asp:Parameter Name="KIAVE" Type="String" /> 
        </SelectParameters>  
    </asp:ObjectDataSource>   
    <asp:ObjectDataSource   
        ID="objDSV"   
        runat="server"   
        SelectMethod="SelectRapprLegal" 
        SortParameterName="orderBy"  
        TypeName="GestioneProcessi" >  
        <SelectParameters>  
            <asp:QueryStringParameter Name="NomeSP" DefaultValue="Particelle_RicercaNotifica" Direction="Input" Type="String" /> 
            <asp:Parameter Name="filterby" Type="String" /> 
        </SelectParameters> 
    </asp:ObjectDataSource>   
    </asp:Content> 
     

    Imports Telerik.Web.UI 
    Imports System.Web.UI.HtmlTextWriterTag 
    Imports System.Web.UI.HtmlControls 
    Partial Public Class NotificaDiVariazione 
        Inherits System.Web.UI.Page 
     
        Dim intIx As Integer 
        Private SFunz As New WebBIODemo.GestioneProcessi() 
        Private cNotifica As New WebBIODemo.cNotifica() 
        Dim table As DataView 
        Dim v() As String 
     
        Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 
            If Me.IsPostBack = False Then 
                For intIx = LBound(UTE_UffTerr, 2) To UBound(UTE_UffTerr, 2) 
                    UFFICIO.Items.Add(New RadComboBoxItem(UTE_UffTerr(1, intIx), UTE_UffTerr(0, intIx))) 
                Next 
                ImpostaCampiPagina(Me.Page, "NotificaDiVariazione", , True) 
                If TestoMessaggio.Length > 0 Then 
                    ApriConnessioni() 
                    lblErrorMsg.Text = CercaDescrErrore(UTE_Lingua, 7) 
                    ChiudiConnessioni() 
                    Exit Sub 
                End If 
                Call NascondiTab() 
                rtsNotifica.FindTabByValue("T").Visible = False 
            End If 
            'se è postback 
            If lstIDUPOF.SelectedValue <> "" Then grdVal(lstIDUPOF.SelectedValue, "F") 
            If rtsModPart.FindTabByValue("E").Selected = True Then 
                If lstIDUPOE.SelectedValue <> "" Then bind_grdValutazione(lstIDUPOE.SelectedValue, "E") 
            ElseIf rtsModPart.FindTabByValue("A").Selected = True Then 
                If lstIDUPOE.SelectedValue <> "" Then bind_grdValutazione(lstIDUPOE.SelectedValue, "A") 
            End If 
        End Sub 
        Public Sub NascondiTab() 
            For intc = 1 To rtsNotifica.Tabs.Count - 1 
                rtsNotifica.Tabs(intc).Visible = False 
            Next 
        End Sub 
        Protected Sub DuplicaNotifica(ByVal sender As Object, ByVal e As EventArgs) Handles btnDupNotif.Click 
            lblErrorMsg.Text = "" 
            Try 
                If Len(Trim(ID.Text)) > 0 Then 
                    ReDim param(0) 
                    ReDim paramVal(0) 
     
                    param(0) = "filterby" 
                    paramVal(0) = " IDDICHIARANTE = " & ID.Text & " AND UFFICIO = " & Apici2(UFFICIO.SelectedValue) & " AND SCSCHEMACERT = " & Apici2(Request.QueryString("SC")) 
     
                    ApriConnessioni() 
                    EseguiStored("NotificaVariazione_Ricerca", param, paramVal, kDataAdapter) 
                    table = New DataView(DS.Tables(0)) 
                    If table.Count > 0 = True Then 
                        txtIDDICHSCHEMA.Text = Nz(table.Item(0).Item("IDDICHSCHEMA"), 0) 
                        txtID.Text = Nz(table.Item(0).Item("IDNOTIFICA"), 0) 
                        IDNOTIFICAP.Text = Nz(table.Item(0).Item("IDNOTIFICA"), 0) 
                    End If 
                    table = Nothing 
                    ChiudiConnessioni() 
     
                    If Len(Trim(txtID.Text)) > 0 Then 
                        ' 
                        ReDim param(4) 
                        ReDim paramVal(4) 
     
                        param(0) = "IDWS" 
                        paramVal(0) = Request.UserHostAddress 
                        param(1) = "IDNOTIFICA" 
                        paramVal(1) = txtID.Text 
                        param(2) = "PROTOCOLLO" 
                        paramVal(2) = txtPROTOCOLLO.Value 
                        param(3) = "DTCOMPILAZIONE" 
                        paramVal(3) = DataXQ(rdpDTCOMPILAZIONE.SelectedDate) 
                        param(4) = "DTPROTOCOLLO" 
                        paramVal(4) = DataXQ(rdpDTPROTOCOLLO.SelectedDate) 
                        If ValidateDuplicate() = True Then 
                            ApriConnessioni() 
                            EseguiStored("NotificaVariazione_Duplica", param, paramVal, kDataAdapter) 
                            table = New DataView(DS.Tables(0)) 
                            If table.Count > 0 = True Then txtID.Text = Nz(table.Item(0).Item("IDNOTIFICA"), 0) 
                            table = Nothing 
                            ChiudiConnessioni() 
                            If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
     
                            Call GrdTestata() 
                            RiempiMultipage(txtID.Text, "NotificheTestata_Leggi", 0) 
                            btnDupNotif.Enabled = False 
                            rtsNotifica.FindTabByValue("T").Visible = True 
                            rpbNotifica.Visible = True 
     
                            Call lstBox() 
                        End If 
                    Else 
                        lblErrorMsg.Text = "Non ci sono notifiche da duplicare" 
                    End If 
                Else 
                    lblErrorMsg.Text = "Scegliere prima il dichiarante" 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Duplica Error: " + ex.Message 
            End Try 
        End Sub 
     
        Public Function ValidateDuplicate() As Boolean 
            Try 
                ValidateDuplicate = True 
                If rdpDTCOMPILAZIONE.IsEmpty = True Then 
                    lblErrorMsg.Text = "Data COMPILAZIONE obbligatorio" 
                    ValidateDuplicate = False 
                    Exit Function 
                ElseIf rdpDTPROTOCOLLO.IsEmpty = True Then 
                    lblErrorMsg.Text = "Data Protocollo obbligatorio" 
                    ValidateDuplicate = False 
                    Exit Function 
                ElseIf CDbl(txtPROTOCOLLO.Value) = 0 Then 
                    lblErrorMsg.Text = "Numero Protocollo obbligatorio" 
                    ValidateDuplicate = False 
                    Exit Function 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Numero Protocollo obbligatorio" 
            End Try 
        End Function 
     
        Protected Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As AjaxRequestEventArgs) Handles RadAjaxManager1.AjaxRequest 
            Try 
                If e.Argument = "Rebind" Then 
                    txtIDDICHSCHEMA.Text = cNotifica.GetIdDichSchema(ID.Text, UFFICIO.SelectedValue, Request.UserHostAddress) 
                    If Len(Trim(IDRAPPRESENTANTE.Text)) > 0 Then Call cNotifica.InSertDichiarantiRapprLegali(IDRAPPRESENTANTE.Text, ID.Text, Request.UserHostAddress) 
     
                    Call GrdTestata() 
     
                    If ModeT.Text = "U" Then Call lstBox() 
     
                    IDDICHSCHEMA.Value = txtIDDICHSCHEMA.Text 
     
     
                ElseIf e.Argument = "Refresh" Then 
     
                    If Len(Trim(txtIDDICHSCHEMA.Text)) = 0 Then txtIDDICHSCHEMA.Text = cNotifica.GetIdDichSchema(ID.Text, UFFICIO.SelectedValue, Request.UserHostAddress) 
     
                    Call GrdTestata() 
     
                    If ModeT.Text = "U" Then Call lstBox() 
                    IDDICHSCHEMA.Value = txtIDDICHSCHEMA.Text 
                ElseIf e.Argument = "rebindSezioneE" Then 
                    If rtsNotifica.SelectedTab.Value = "E" Then 
                        'Call grdVal(lstIDUPOE.SelectedValue, "E") 
                    ElseIf rtsNotifica.SelectedTab.Value = "F" Then 
                        Call grdVal(lstIDUPOF.SelectedValue, "F") 
                    ElseIf rtsNotifica.SelectedTab.Value = "F" Then 
                        Dim MP As RadMultiPage = ucModAnag.FindControl("rmpModAnag") 
                        Dim grdS As RadGrid = MP.Controls(1).FindControl("grdStruttura") 
     
                        grdS.Rebind() 
                        grdS.MasterTableView.Rebind() 
                    End If 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Error on ajax request: " + ex.Message 
            End Try 
        End Sub 
     
        Sub GrdTestata() 
            grdDich.DataSourceID = "objDSDich" 
            grdDich.MasterTableView.DataSourceID = "objDSDich" 
            objDSDich.SelectParameters("filterby").DefaultValue = " ID = " & ID.Text 
     
            Dim MP As RadMultiPage = ucModAnag.FindControl("rmpModAnag") 
            Dim grdU As RadGrid = MP.Controls(0).FindControl("grdUnita") 
            Dim grdL As RadGrid = MP.Controls(0).FindControl("grdLegale") 
     
            grdU.Rebind() 
            grdU.MasterTableView.Rebind() 
     
            grdL.Rebind() 
            grdL.MasterTableView.Rebind() 
        End Sub 
     
        Protected Sub btnSave(ByVal sender As Object, ByVal e As EventArgs) 
            'per prendere il valore del id Dich schema 
            lblErrorMsg.Text = "" 
            Try 
                If rdpDTCOMPILAZIONE.IsEmpty = True Then 
                    lblErrorMsg.Text = "Data compilazione obbligatoria" 
                    Exit Sub 
                End If 
                If rdpDTPROTOCOLLO.IsEmpty = True Then 
                    lblErrorMsg.Text = "Data protocollo obbligatoria" 
                    Exit Sub 
                End If 
                If CDbl(txtPROTOCOLLO.Value) = 0 Or Len(Trim(txtPROTOCOLLO.Value)) = 0 Then 
                    lblErrorMsg.Text = "N° protocollo obbligatoria" 
                    Exit Sub 
                End If 
     
     
                If ModeT.Text = "I" Then 
                    Call InsertUpdate(0, "NotificheTestata_Insert", ModeT.Text, txtID) 
                    If TestoMessaggio.Length = 0 Then 
                        ModeT.Text = "U" 
                        'abilita i tab 
                    End If 
                Else 
                    Call InsertUpdate(0, "NotificheTestata_Update", ModeT.Text, txtID) 
                End If 
                Call lstBox() 
                lblErrorMsg.Text = "Scegliere Almeno un'attività!" 
            Catch ex As Exception 
                lblErrorMsg.Text = "Error Salvataggio Notifica Testata: " + ex.Message 
            End Try 
        End Sub 
     
        Protected Sub RadTabStrip1_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles rtsNotifica.TabClick 
            lblErrorMsg.Text = "" 
            Try 
     
                If e.Tab.Value = "T" Then 
                ElseIf e.Tab.Value = "A" Then 
                ElseIf e.Tab.Value = "B" Then 
                ElseIf e.Tab.Value = "C" Then 
                ElseIf e.Tab.Value = "D" Then 
                ElseIf e.Tab.Value = "E" Then 
                ElseIf e.Tab.Value = "M" Then 
                ElseIf e.Tab.Value = "N" Then 
                    Dim rts As RadTabStrip = ucModAtt.FindControl("rtsModAnag") 
                    rts.FindTabByValue("T").Selected = True 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Errore TabClick: " + ex.Message 
            End Try 
        End Sub 
        Public Sub InsertUpdate(ByVal indexM As Integer, ByVal NomeSP As String, ByVal tipo As String, Optional ByVal txt As RadTextBox = Nothing
            If tipo = "I" Then 
                Try 
                    ApriConnessioni() 
                    ImpostaCampiDataBaseMultipage(Me.Page, Request.UserHostAddress, "PrimaNotifica.aspx", indexM) 
                    If TestoMessaggio.Length = 0 Then EseguiStored(NomeSP, param, paramVal, kDataReader) 
                    If TestoMessaggio.Length > 0 Then 
                        lblErrorMsg.Text = TestoMessaggio 
                    Else 
                        With DR 
                            If .Read = True Then txt.Text = Nz(.GetValue(.GetOrdinal("ID")), 0) 
                        End With 
                    End If 
                    ChiudiConnessioni() 
                Catch ex As Exception 
                    lblErrorMsg.Text = "InsertUpdate(Insert) sub Error: " + ex.Message 
                End Try 
            Else 
                Try 
                    ApriConnessioni() 
                    ImpostaCampiDataBaseMultipage(Me.Page, Request.UserHostAddress, "PrimaNotifica.aspx", indexM) 
                    If TestoMessaggio.Length = 0 Then EseguiStored(NomeSP, param, paramVal, kAggiornaDati) 
                    If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
                    ChiudiConnessioni() 
                Catch ex As Exception 
                    lblErrorMsg.Text = "InsertUpdate(Edit) sub Error: " + ex.Message 
                End Try 
            End If 
        End Sub 
        Private Sub RiempiMultipage(ByVal id As Integer, ByVal NomeSp As String, ByVal IndexM As Integer, Optional ByVal upo As Int32 = Nothing
            intc = 0 
            ReDim param(intc) 
            ReDim paramVal(intc) 
     
            param(intc) = "ID" 
            paramVal(intc) = id 
            If upo <> Nothing Then 
                intcintc = intc + 1 
                ReDim Preserve param(intc) 
                ReDim Preserve paramVal(intc) 
                param(intc) = "IDUPO" 
                paramVal(intc) = upo 
            End If 
     
            Call RiempiSkdMultiPage(NomeSp, Me.Page, param, paramVal, IndexM) 
            If TestoMessaggio.Length > 0 Then 
                lblErrorMsg.Text = TestoMessaggio 
            End If 
        End Sub 
        
        Sub lstBox() 
            lstIDUPOF.Items.Clear() 
            RiempiListBox(lstIDUPOF, "NotificheTestata_ZoomUPO", "IDC", "DESCRIZIONE", " IDDICHIARANTE = " & ID.Text & " AND IDDICHSCHEMA = " & txtIDDICHSCHEMA.Text) 
            If lstIDUPOF.Items.Count > 1 Then lstIDUPOF.Items.Insert(0, New RadComboBoxItem("Not Defined", "")) 
     
            lstIDUPOE.Items.Clear() 
            RiempiListBox(lstIDUPOE, "NotificheTestata_ZoomUPO", "IDC", "DESCRIZIONE", " IDDICHIARANTE = " & ID.Text & " AND IDDICHSCHEMA = " & txtIDDICHSCHEMA.Text) 
            If lstIDUPOE.Items.Count > 1 Then lstIDUPOE.Items.Insert(0, New RadComboBoxItem("Not Defined", "")) 
        End Sub 
        Protected Sub lstChangeIndex(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) Handles lstIDUPOF.SelectedIndexChanged 
            Dim lst As RadComboBox = sender 
            If lst.ZIndex = 1 Then 
     
            ElseIf lst.ZIndex = 5 Then 
                If lst.SelectedValue <> "" Then Call grdVal(lst.SelectedValue, "E") 
            ElseIf lst.ZIndex = 6 Then 
                If lst.SelectedValue <> "" Then Call grdVal(lst.SelectedValue, "F") 
            ElseIf lst.ZIndex = 7 Then 
                If lst.SelectedValue <> "" Then Call grdVal(lst.SelectedValue, "G") 
            End If 
        End Sub 
        Function getRowCount(ByVal sp As String, ByVal id As Int32, ByVal upo As Int32) As Int32 
            Dim dw As DataView 
            ReDim param(1) 
            ReDim paramVal(1) 
     
            param(0) = "ID" 
            paramVal(0) = id 
            param(1) = "IDUPO" 
            paramVal(1) = upo 
     
            ApriConnessioni() 
            EseguiStored(sp, param, paramVal, kDataAdapter) 
            If TestoMessaggio.Length > 0 Then 
                ChiudiConnessioni() 
                lblErrorMsg.Text = "getRowCount error: " + TestoMessaggio 
                Exit Function 
            End If 
            dw = New DataView(DS.Tables(0)) 
            getRowCount = dw.Count 
     
            KillDataAdapter() 
            ChiudiConnessioni() 
        End Function 
        Protected Sub lstChangeIndexUfficio(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) Handles UFFICIO.SelectedIndexChanged 
            If Len(Trim(txtIDDICHSCHEMA.Text)) > 0 Then 
                ReDim param(1) 
                ReDim paramVal(1) 
                ApriConnessioni() 
                param(0) = "IDDICHSCHEMA" 
                paramVal(0) = txtIDDICHSCHEMA.Text 
                paramVal(1) = UFFICIO.SelectedValue 
                param(1) = "UFFICIO" 
     
                EseguiStored("DichiarantiSchemi_UpdateDaNotifica", param, paramVal, kAggiornaDati) 
                If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
                ChiudiConnessioni() 
            End If 
        End Sub 
        Sub lstChangeIndexControlsValidate(ByVal txt As TextBox, ByVal sp As String, ByVal indexM As Integer, ByVal Letter As String, ByVal idUpo As Integer) 
            If txt.Text = "U" Then 
                If getRowCount(sp, txtID.Text, idUpo) > 0 Then 
                    Call RiempiMultipage(txtID.Text, sp, indexM, idUpo) 
                    If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
                Else 
                    txt.Text = "I" 
                    Call vuotaSkedMultiPage(Me.Page, indexM, Letter) 
                    If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
                End If 
            Else 
                txt.Text = "I" 
                Call vuotaSkedMultiPage(Me.Page, indexM, Letter) 
                If TestoMessaggio.Length > 0 Then lblErrorMsg.Text = TestoMessaggio 
            End If 
        End Sub 
     
     
        Sub grdVal(ByVal id As Integer, ByVal t As String) 
            If t = "E" Then 
                'grdValutazione.DataSourceID = "objDSV" 
                'objDSV.SelectParameters("filterby").DefaultValue = " Particelle.IDUPO = " & id & " AND Particelle.IDNOTIFICA = " & txtID.Text 
                'grdValutazione.DataBind() 
            ElseIf t = "F" Then 
                grdAppezz.DataSourceID = "objDSM" 
                objDSM.SelectParameters("filterBy").DefaultValue = " IDUPO = " & id & " AND IDNOTIFICA = " & txtID.Text 
                grdAppezz.DataBind() 
                'grdAppezz.Rebind() 
                'grdAppezz.MasterTableView.Rebind() 
                'grdAppezz.MasterTableView.DetailTables.OwnerGrid.Rebind() 
            End If 
        End Sub 
     
        Private Sub DisplayMessage(ByVal text As String, ByVal grd As RadGrid) 
            grd.Controls.Add(New LiteralControl(String.Format("<span style='color:red'>{0}</span>", "<br />" & text))) 
        End Sub 
     
        Private gridMessage As String = Nothing 
        Protected Sub grdF_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles grdAppezz.DataBound 
            If Not String.IsNullOrEmpty(gridMessage) Then 
                DisplayMessage(gridMessage, grdAppezz) 
            End If 
        End Sub 
        Private Sub SentMessage(ByVal text As String) 
            gridMessage = text 
        End Sub 
     
        Protected Sub grdAp_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles grdAppezz.ItemCreated 
            Try 
                If TypeOf e.Item Is GridDataItem And e.Item.OwnerTableView.Name = "Master" Then 
                    Dim editLink As ImageButton = DirectCast(e.Item.FindControl("btnEdit"), ImageButton) 
                    Dim P As String = DirectCast(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("KIAVE"), String) 
     
                    Dim id As String 
                    id = P.ToString() 
     
                    editLink.Attributes("onclick") = [String].Format("return Edit('{0}','{1}','{2}');", id.ToString(), e.Item.ItemIndex, "F") 
                End If 
            Catch ex As Exception 
                SentMessage("grdAppezz error: " + ex.Message) 
            End Try 
        End Sub 
        Protected Sub lst_SelectedIndexChanged(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) 
            Dim lst As RadComboBox = DirectCast(sender, RadComboBox) 
            Dim editedItem As GridEditableItem = CType(CType(sender, RadComboBox).NamingContainer, GridEditableItem) 
            If lst.ID = "Provincia" Then 
                IndexP.Text = e.Value 
                Dim Nazione As RadTextBox = DirectCast(editedItem.FindControl("Nazione"), RadTextBox) 
                Dim COM As RadComboBox = DirectCast(editedItem.FindControl("Comune"), RadComboBox) 
     
                COM.Items.Clear() 
                RiempiListBox(COM, "Comuni_Zoom", "CODICE", "DESCRIZIONE", " CODISTATPROV = " & Apici2(e.Value)) 
                If COM.Items.Count > 1 Then COM.Items.Insert(0, New RadComboBoxItem("", "")) 
     
                'valorizza la nazione particella 
                ReDim param(0) 
                ReDim paramVal(0) 
                param(0) = "filterby" 
                paramVal(0) = " CODICEISTAT = " & Apici2(e.Value) 
                ApriConnessioni() 
                EseguiStored("Province_ZoomCodiceISTAT", param, paramVal, kDataReader) 
                If DR.Read = True Then Nazione.Text = Nz(DR.GetValue(DR.GetOrdinal("NOTE")), "") 
                DR.Close() 
                ChiudiConnessioni() 
            ElseIf lst.ID = "pspecie" Then 
                Dim Var As RadComboBox = DirectCast(editedItem.FindControl("pvarieta"), RadComboBox) 
                IndexS.Text = e.Value 
                RiempiListBox(Var, "VarietaSpecieVegetali_Zoom", "CODICE", "DESCRIZIONE", " SPECIEVEGETALE = " & Apici2(e.Value)) 
     
                SentMessage("<b>Varieta cambiato</b>") 
            End If 
        End Sub 
        Protected Sub grdApp_ColumnCreated(ByVal sender As Object, ByVal e As GridColumnCreatedEventArgs) Handles grdAppezz.ColumnCreated 
            If TypeOf e.Column Is GridExpandColumn Then 
                TryCast(e.Column, GridExpandColumn).ButtonType = GridExpandColumnType.ImageButton 
     
                TryCast(e.Column, GridExpandColumn).ExpandImageUrl = "~/_img/plus.gif" 
                TryCast(e.Column, GridExpandColumn).CollapseImageUrl = "~/_img/minus.gif" 
            End If 
        End Sub 
        Protected Sub RadMenu1_ItemClick(ByVal sender As Object, ByVal e As RadPanelBarEventArgs) Handles rpbNotifica.ItemClick 
            Try 
                If e.Item.Value = "D" Then 
                    Call NascondiTab() 
                    rtsNotifica.FindTabByValue("M").Visible = True 
                    rmpNotifica.SelectedIndex = 0 
                ElseIf e.Item.Value = "A" Then 
                    Call NascondiTab() 
                    rtsNotifica.FindTabByValue("N").Visible = True 
                    rmpNotifica.SelectedIndex = 0 
                ElseIf e.Item.Value = "S" Then 
                    Call NascondiTab() 
                    rtsNotifica.FindTabByValue("E").Visible = True 
                    rmpNotifica.SelectedIndex = 0 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Error RadMenu Click: " + ex.Message 
            End Try 
        End Sub 
     
        'routine per pageview particelle 
        Sub bind_grdValutazione(ByVal id As Integer, ByVal caller As String) 
            Try 
                If caller = "A" Then 
                    grdValutazione.DataSourceID = "objDSV" 
                    objDSV.SelectParameters("filterby").DefaultValue = " Particelle.IDUPO = " & id & " AND Particelle.IDNOTIFICA = " & txtID.Text & " AND Particelle.NOTAMOD <> 'Esistente'" 
                    grdValutazione.DataBind() 
                ElseIf caller = "E" Then 
                    grdValutazione.DataSourceID = "objDSV" 
                    objDSV.SelectParameters("filterby").DefaultValue = " Particelle.IDUPO = " & id & " AND Particelle.IDNOTIFICA = " & txtID.Text 
                    grdValutazione.DataBind() 
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Data grid Binding(grdVal sub): " + ex.Message 
            End Try 
        End Sub 
     
        'routine per datagrid 
     
        Protected Sub grdE_DataBound(ByVal sender As Object, ByVal e As EventArgs) Handles grdValutazione.DataBound 
            If Not String.IsNullOrEmpty(gridMessage) Then 
                DisplayMessage(gridMessage, grdValutazione) 
            End If 
        End Sub 
        Protected Sub ParticelleItemcreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles grdValutazione.ItemCreated 
            Try 
                If TypeOf e.Item Is GridDataItem Then 
                    Dim DataItem As GridDataItem = DirectCast(e.Item, GridDataItem) 
                    Dim pulsante As GridTemplateColumn = DirectCast(DataItem.OwnerTableView.Columns.FindByUniqueName("colPulsante"), GridTemplateColumn) 
                    Dim colDelete As GridButtonColumn = DirectCast(DataItem.OwnerTableView.Columns.FindByUniqueName("colDelete"), GridButtonColumn) 
                    Dim btnT As ImageButton = DirectCast(DataItem.FindControl("btnT"), ImageButton) 
                    Dim P As Integer = DirectCast(e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("IDPARTICELLA"), Integer) 
                    Dim D As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("IDPAP").ToString 
                    Dim A As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("IDAPPEZZAMENTO").ToString 
                    Dim kiave As String = e.Item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("kiave").ToString 
     
                    If rtsModPart.SelectedTab.Value = "A" Then 
                        pulsante.Visible = False 
                        colDelete.Visible = False 
                    ElseIf rtsModPart.SelectedTab.Value = "E" Then 
                        pulsante.Visible = False 
                        btnVis.Visible = False 
                        btnPart.Visible = False 
                        colDelete.Visible = True 
                    End If 
                End If 
            Catch ex As Exception 
                SentMessage("error databound(grdLegale): " + ex.Message) 
            End Try 
        End Sub 
        Protected Sub grdValutazione_ondelete(ByVal sender As Object, ByVal e As GridCommandEventArgs) Handles grdValutazione.DeleteCommand 
            Try 
                Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) 
                Dim kiave As String = dataItem.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("kiave").ToString 
                SFunz.DeleteParticella(kiave, "Particelle_Delete") 
                If TestoMessaggio.Length > 0 Then 
                    SentMessage("Ondelete Error: " + TestoMessaggio) 
                End If 
            Catch ex As Exception 
                SentMessage("OnDelete error: " + ex.Message) 
            End Try 
        End Sub 
     
        Protected Sub lstChangeIndex_particelle(ByVal sender As Object, ByVal e As RadComboBoxSelectedIndexChangedEventArgs) Handles lstIDUPOE.SelectedIndexChanged 
            Dim lst As RadComboBox = sender 
            If lst.SelectedValue <> "" Then Call bind_grdValutazione(lst.SelectedValue, rtsModPart.SelectedTab.Value) 
            btnPart.Attributes("onclick") = "Insert('e','" + e.Value + "'); return false;" 
        End Sub 
     
        Protected Sub rtsModPart_TabClick(ByVal sender As Object, ByVal e As RadTabStripEventArgs) Handles rtsModPart.TabClick 
            lblErrorMsg.Text = "" 
            Try 
     
                If e.Tab.Value = "E" Then 
                    ' grdVal(lstIDUPOE.SelectedValue, e.Tab.Value) 
                    btnPart.Visible = False 
                    btnVis.Visible = False 
                ElseIf e.Tab.Value = "A" Then 
                    ' grdVal(lstIDUPOE.SelectedValue, e.Tab.Value) 
                    btnPart.Visible = True 
                    btnVis.Visible = True 
                ElseIf e.Tab.Value = "C" Then 
     
     
                ElseIf e.Tab.Value = "F" Then 
     
                ElseIf e.Tab.Value = "S" Then 
     
                End If 
            Catch ex As Exception 
                lblErrorMsg.Text = "Errore TabClick: " + ex.Message 
            End Try 
        End Sub 
     
        Protected Sub VisualizzaTutti(ByVal sender As Object, ByVal e As ImageClickEventArgs) Handles btnVis.Click 
            If lstIDUPOE.SelectedValue <> "" Then bind_grdValutazione(lstIDUPOE.SelectedValue, "E") 
        End Sub 
    End Class 
     

    thanks in advance
    regards
    webster
  2. Webster Velasco
    Webster Velasco avatar
    114 posts
    Member since:
    Jun 2012

    Posted 25 May 2010 Link to this post

    forgot to attach the image

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Mira
    Admin
    Mira avatar
    1124 posts

    Posted 28 May 2010 Link to this post

    Hello Webster,

    I suggest that you set the EnableEventValidation property of the Page to true:
    <%@ Page Language="vb" EnableEventValidation="false" AutoEventWireup="false" MasterPageFile="~/Main.Master" CodeBehind="NotificaDiVariazione.aspx.vb" Inherits="WebBIODemo.NotificaDiVariazione" %>

    If the issue persists, please sent us a small working project, demonstrating your full setup and showing the unwanted behavior.
    We will debug it locally and get back to you.

    Sincerely yours,
    Mira
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Back to Top