need help

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

    Posted 27 Nov 2009 Link to this post

    hi

    i have this problem when i try to compile this code its says sintax error but i cnt see where the error is

    help me plz.

    here is the code:
    <%@ Page Language="vb" MasterPageFile="Main.Master" AutoEventWireup="false" CodeBehind="UTEPagineDemo.aspx.vb" Inherits="WebBIODemo.UTEPagineDemo" %> 
     
    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %> 
     
    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
      <div style="height:500px"
          <telerik:RadScriptManager ID="RadScriptManager1" runat="server"
          </telerik:RadScriptManager> 
          <!-- content inizia qui --> 
          <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"
           
            <script type="text/javascript"
                function RowDblClick(sender, eventArgs) { 
                    sender.get_masterTableView().editItem(eventArgs.get_itemIndexHierarchical()); 
                } 
            </script>    
                
          </telerik:RadCodeBlock> 
          <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
            <AjaxSettings> 
                <telerik:AjaxSetting AjaxControlID=""
                    <UpdatedControls> 
                        <telerik:AjaxUpdatedControl ControlID="" LoadingPanelID="rlpUTEPagineGRID" /> 
                    </UpdatedControls> 
                </telerik:AjaxSetting> 
            </AjaxSettings> 
          </telerik:RadAjaxManager> 
          <telerik:RadAjaxLoadingPanel ID="rlpUTEPagineGRID" runat="server" Skin="Default" /> 
          <div> 
            <telerik:RadGrid ID="grdUTEPagine" runat="server"   
                GridLines="None" 
                AllowPaging="false"  
                AllowSorting="True"  
                AutoGenerateColumns="False" 
                ShowStatusBar="true"  
                AllowAutomaticDeletes="True"  
                AllowAutomaticInserts="True" 
                AllowAutomaticUpdates="True" 
                HorizontalAlign="NotSet"  
                DataSourceID="objDS"
                <MasterTableView CommandItemDisplay="TopAndBottom" DataSourceID="objDS" 
                    DataKeyNames="CODICELINGUA,CODICEFORM" EditMode="PopUp"
                    <Columns> 
                            <telerik:GridEditCommandColumn UniqueName="EditRecord" Resizable="false" ButtonType="LinkButton">                                                
                                <HeaderStyle Width="48px" /> 
                            </telerik:GridEditCommandColumn> 
     
                                <telerik:GridBoundColumn DataField="DESCRIZIONE" HeaderText="Descrizione" SortExpression="DESCRIZIONE" 
                                    UniqueName="colDESCRIZIONE" FilterImageToolTip="Filtro per descrizione" Resizable="true"
                                    <HeaderStyle Width="310px" /> 
                                </telerik:GridBoundColumn>       
                                         
                                <telerik:GridBoundColumn DataField="DESCRIZIONEAIUTO" HeaderText="Descrizione AIUTO" SortExpression="DESCRIZIONEAIUTO" 
                                    UniqueName="colDESCRIZIONEAIUTO" FilterImageToolTip="Filtro per descrizione inglese" Resizable="true"
                                    <HeaderStyle Width="310px" /> 
                                </telerik:GridBoundColumn>                   
     
                                <telerik:GridBoundColumn DataField="ANNOTAZIONI" HeaderText="ANNOTAZIONI" SortExpression="ANNOTAZIONI" 
                                    UniqueName="colANNOTAZIONI" FilterImageToolTip="Filtro per descrizione inglese" Resizable="true"
                                    <HeaderStyle Width="310px" /> 
                                </telerik:GridBoundColumn>   
                                     
                            <telerik:GridButtonColumn CommandName="Delete" ButtonType="linkbutton"></telerik:GridButtonColumn> 
                     
                    </Columns> 
                    <EditFormSettings InsertCaption="New Item" CaptionDataField="CODICELINGUA,CODICEFORM" 
                        CaptionFormatString="Edit CODICELINGUA: {0}, Edit CODICEFORM: {0}" EditFormType="Template"
                        <PopUpSettings Modal="true" /> 
                        <FormTemplate> 
                        <table id="Table1" cellspacing="1" cellpadding="1" width="250" border="0"
                            <tr> 
                                <td> 
                                </td> 
                                <td> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Descrizione: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox10" Text='<%# Bind( "DESCRIZIONE") %>' runat="server"
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Descrizione Aiuto: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox11" Text='<%# Bind( "DESCRIZIONEAIUTO") %>' runat="server"
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                            <tr> 
                                <td> 
                                    Annotazioni: 
                                </td> 
                                <td> 
                                    <asp:TextBox ID="TextBox12" Text='<%# Bind( "ANNOTAZIONI") %>' runat="server"
                                    </asp:TextBox> 
                                </td> 
                            </tr> 
                        </table> 
                        <table style="width: 100%"
                            <tr> 
                                <td align="right" colspan="2"
                                    <asp:Button ID="Button1" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' 
                                        runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>'
                                    </asp:Button>&nbsp; 
                                    <asp:Button ID="Button2" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel"
                                    </asp:Button> 
                                </td> 
                            </tr> 
                        </table>                         
                        </FormTemplate> 
                    </EditFormSettings> 
                 </MasterTableView> 
                <ClientSettings> 
                    <ClientEvents OnRowDblClick="RowDblClick" /> 
                </ClientSettings> 
            </telerik:RadGrid> 
        <asp:ObjectDataSource  
            ID="objDS"  
            runat="server"  
            SelectMethod="selectUTEPagine" 
            UpdateMethod="updateUTEPagine" 
            InsertMethod="insertUTEPagine"       
            DeleteMethod="deleteUTEPagine"       
            SortParameterName="orderBy" 
            TypeName="_classes.GestioneLingue" 
            ConflictDetection="CompareAllValues" 
            OldValuesParameterFormatString="orig_{0}"
            <SelectParameters> 
                <asp:ControlParameter ControlID="grdUTEPagine" Name="filterBy" PropertyName="MasterTableView.FilterExpression" Type="String" /> 
            </SelectParameters> 
             
            <UpdateParameters> 
                <asp:Parameter Name="CODICELINGUA" Type="String" /> 
                <asp:Parameter Name="CODICEFORM" type="Int32" /> 
                <asp:Parameter Name="DESCRIZIONE" Type="String" /> 
                <asp:Parameter Name="DESCRIZIONEAIUTO" Type="String" /> 
                <asp:Parameter Name="ANNOTAZIONI" Type="String" /> 
                <asp:Parameter Name="orig_CODICELINGUA" Type="String" /> 
                <asp:Parameter Name="orig_CODICEFORM" Type="Int32" /> 
            </UpdateParameters> 
             
            <InsertParameters> 
                <asp:Parameter Name="CODICELINGUA" Type="String" /> 
                <asp:Parameter Name="CODICEFORM" type="Int32" /> 
                <asp:Parameter Name="DESCRIZIONE" Type="String" /> 
                <asp:Parameter Name="DESCRIZIONEAIUTO" Type="String" /> 
                <asp:Parameter Name="ANNOTAZIONI" Type="String" /> 
            </InsertParameters> 
             
            <DeleteParameters> 
                <asp:Parameter Name="orig_CODICELINGUA" Type="String" /> 
                <asp:Parameter Name="orig_CODICEFORM" Type="Int32" /> 
            </DeleteParameters> 
             
        </asp:ObjectDataSource>        
          </div> 
      </div> 
    </asp:Content> 

  2. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 27 Nov 2009 Link to this post

    Hello Webster,

    I examined your code and noticed that your file is VB but the syntax used in the expressions is in C# style:
    '<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>'

    In VB you should modify it this way:
    '<%# IIf(TypeOf Container Is GridEditFormInsertItem, "Insert", "Update") %>'

    Regards,
    Daniel
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top