errormessage in radwindowtitle on opening it

2 posts, 1 answers
  1. Mario
    Mario avatar
    75 posts
    Member since:
    Jun 2009

    Posted 21 Jul 2009 Link to this post

    Hello,

    i want to open a radWindow with this page:


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="AddRelation.aspx.cs" Inherits="EDMS.Web.Userpages.AddRelation" %> 
     
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 
     
    <html xmlns="http://www.w3.org/1999/xhtml" > 
    <head runat="server"
        <title>Untitled Page</title> 
    </head> 
    <body style="background-color : #E1E1E0"
        <form id="form1" runat="server"
             
            <telerik:RadScriptManager ID="radScriptManager" runat="server"
            </telerik:RadScriptManager> 
             
            <telerik:RadSkinManager ID="radSkinManager" runat="server" Skin="Outlook"
            </telerik:RadSkinManager> 
             
            <telerik:RadAjaxManager ID="radAjaxManager" runat="server"
            </telerik:RadAjaxManager> 
             
            <telerik:RadAjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server"
            </telerik:RadAjaxLoadingPanel> 
         
            <script type="text/javascript"
                function GetRadWindow() 
                { 
                   var oWindow = null
                   if (window.radWindow) oWindow = window.radWindow; 
                   else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; 
                   return oWindow; 
                } 
                 
                function returnToParent() 
                { 
                    //create the argument that will be returned to the parent page 
                    var oArg = new Object(); 
                                     
                    //get the selected date from RadGrid 
                    var radGrid = $find("<%= radGrid.ClientID %>"); 
                    oArg.docId = radGrid.get_selectedValue; 
                                                               
                    //get a reference to the current RadWindow 
                    var oWnd = GetRadWindow(); 
                     
                    //Close the RadWindow and send the argument to the parent page 
                    if(oArg.docId) 
                    { 
                        oWnd.close(oArg); 
                    } 
                    else 
                    { 
                        alert("Please choose Document"); 
                    } 
                } 
            </script> 
             
            <table width="800px"
                <tr> 
                    <td align="left" style="background-color:White"
                        <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Default/Images/iflowsIcon.jpg"/> 
                        <strong><asp:Label ID="lblDocumentSearch" runat="server" OnLoad="OnLabelLoad" Text="documentsearch" style="padding: 5px;"></asp:Label></strong
                    </td> 
                </tr> 
                <tr> 
                    <td class="mytableGraySeperator"
                    </td> 
                </tr> 
                <tr> 
                    <td> 
                        <telerik:RadPanelBar runat="server" ID="panelBarSearch" AllowCollapseAllItems="false" ExpandMode="SingleExpandedItem" Width="800"
                            <Items> 
                                <telerik:RadPanelItem Expanded="true" Text="simplesearch" Value="simplesearch" runat="server" OnLoad="OnPanelItemLoad"
                                    <Items> 
                                        <telerik:RadPanelItem> 
                                            <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblSearchAlltextFields" runat="server" Text="searchalltextfields" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadTextBox ID="txbSearchAllTextFields" runat="server"></telerik:RadTextBox> 
                                                        </td> 
                                                        <td align="right"
                                                            <asp:Button ID="btnSimpleSearch" Text="Search" runat="server" OnClick="btnSimpleSearch_Click"/> 
                                                        </td>                                   
                                                    </tr> 
                                                </table> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelItem> 
                                <telerik:RadPanelItem Expanded="false" Text="detailsearch" Value="detailsearch" runat="server" OnLoad="OnPanelItemLoad"
                                    <Items> 
                                        <telerik:RadPanelItem> 
                                            <ItemTemplate> 
                                                <table> 
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblCategory" runat="server" Text="category" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadComboBox ID="cobxCategory" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblName" runat="server" Text="documentname" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadTextBox ID="txbName" runat="server"></telerik:RadTextBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblDescription" runat="server" Text="description" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadTextBox ID="txbDescription" runat="server"></telerik:RadTextBox> 
                                                        </td>                                     
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblFileSize" runat="server" Text="filesize" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadComboBox ID="cobxFileSize" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblCreater" runat="server" Text="creater" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadTextBox ID="txbCreater" runat="server"></telerik:RadTextBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblPhysicalStorage" runat="server" Text="physicalstorage" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadTextBox ID="txbPhysicalStorage" runat="server"></telerik:RadTextBox> 
                                                        </td>                                     
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblFileExtension" runat="server" Text="fileextension" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadComboBox ID="cobxFileExtension" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblCreatedDateFrom" runat="server" Text="createddatefrom" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadDatePicker ID="datePickerCreatedFrom" runat="server" ></telerik:RadDatePicker> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblCreatedDateTo" runat="server" Text="createddateto" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadDatePicker ID="datePickerCreatedTo" runat="server" ></telerik:RadDatePicker> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td> 
                                                            <asp:Label ID="lblDocumentState" runat="server" Text="state" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadComboBox ID="cobxDocumentState" runat="server" MarkFirstMatch="true"></telerik:RadComboBox> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblLastEditedDateFrom" runat="server" Text="lastediteddatefrom" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadDatePicker ID="datePickerLastEditedFrom" runat="server" ></telerik:RadDatePicker> 
                                                        </td> 
                                                        <td> 
                                                            <asp:Label ID="lblLastEditedDateTo" runat="server" Text="lastediteddateto" OnLoad="OnLabelLoad"></asp:Label> 
                                                        </td> 
                                                        <td> 
                                                            <telerik:RadDatePicker ID="datePickerLastEditedTo" runat="server" ></telerik:RadDatePicker> 
                                                        </td> 
                                                    </tr> 
                                                    <tr> 
                                                        <td align="right" colspan="6"
                                                            <asp:Button ID="btnDetailSearch" Text="Search" runat="server" OnClick="btnDetailSearch_Click"/> 
                                                        </td> 
                                                    </tr> 
                                                </table> 
                                            </ItemTemplate> 
                                        </telerik:RadPanelItem> 
                                    </Items> 
                                </telerik:RadPanelItem> 
                            </Items> 
                        </telerik:RadPanelBar> 
                    </td> 
                </tr> 
                <tr> 
                    <td align="left"
                        <asp:Label ID="lblFoundDocuments" runat="server" Text="documentsfound"></asp:Label> 
                    </td> 
                </tr> 
            </table> 
         
            <table cellpadding="0" cellspacing="0" width="800px"
                <tbody valign="top"
                    <tr> 
                        <td align="left" style="background-color:White"
                            <asp:Image ID="imgIcon" runat="server" ImageUrl="~/App_Themes/Default/Images/iflowsIcon.jpg"/> 
                            <strong><asp:Label ID="lblTitle" runat="server" Text="chooseDocument" OnLoad="OnLabelLoad" style="padding: 5px;"></asp:Label></strong
                        </td> 
                    </tr> 
                    <tr> 
                        <td class="mytableDarkBlueSeperator"
                        </td> 
                    </tr> 
                    <tr> 
                        <td> 
                            <telerik:RadGrid ID="radGrid" runat="server" 
                                                AllowPaging="True"  
                                                PageSize="20" 
                                                AutoGenerateColumns="False" 
                                                GridLines="Both" 
                                                OnNeedDataSource="Radgrid_NeedDatasource"
                                 
                                <MasterTableView DataKeyNames="id"
                                    <CommandItemTemplate> 
                                        <div style="padding: 5px 5px;"
                                            <img onload="returnToParent" style="border:0px;vertical-align:middle;" alt="" src="../App_Themes/Default/Images/file_icon.gif"/> 
                                            <asp:Label ID="lblChooseDocument" runat="server" Text="choosedocument" OnLoad="OnLabelLoad"></asp:Label> 
                                        </div> 
                                    </CommandItemTemplate> 
                                                                                         
                                    <Columns> 
                                     
                                        <telerik:GridBoundColumn DataField="id" Visible="false"></telerik:GridBoundColumn> 
                                            <telerik:GridTemplateColumn> 
                                                <ItemTemplate> 
                                                    <asp:Image runat="server" ID="imgNew" 
                                                        OnLoad="OnImageLoad" /> 
                                                    <asp:TextBox ID="txbCreatedDate" runat="server" 
                                                        Visible ="false" 
                                                        Text='<%# DataBinder.Eval(Container.DataItem,"created_date").ToString() %>' /> 
                                                </ItemTemplate> 
                                            </telerik:GridTemplateColumn> 
                                            <telerik:GridHyperLinkColumn DataTextField="Metainformation.name" HeaderText="Profile" DataNavigateUrlFormatString="DocumentProfile.aspx?id={0}" DataNavigateUrlFields="id" ></telerik:GridHyperLinkColumn> 
                                            <telerik:GridBoundColumn DataField="Category.name" HeaderText="Kategorie"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="User.lastname" HeaderText="Ersteller"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="created_date" HeaderText="Erstellungsdatum"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="User1.lastname" HeaderText="letzter Bearbeiter"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="checkout_date" DataType="System.DateTime" HeaderText="in Verwendung seit"></telerik:GridBoundColumn> 
                                            <telerik:GridBoundColumn DataField="Folder.name" HeaderText="Ordner"></telerik:GridBoundColumn> 
                                             
                                        </Columns> 
                                           
                                        <RowIndicatorColumn> 
                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                        </RowIndicatorColumn> 
     
                                        <ExpandCollapseColumn> 
                                            <HeaderStyle Width="20px"></HeaderStyle> 
                                        </ExpandCollapseColumn> 
                                    </MasterTableView>           
                            </telerik:RadGrid> 
                        </td> 
                    </tr> 
                </tbody> 
            </table> 
             
             
        </form> 
    </body> 
    </html> 
     


    The Radwindow opens, but it gives me following errormessage:

    german:

    Die Steuerelementauflistung kann nicht geändert werden, da das Steuerelement Codeblöcke enthält

    english maybe:

    The controllisting cant be changed, because the control contains code.

    Question 1: Anyone got the same error?

    Question 2:

    I want to return the id that is the DatakeyValue of a selected row to the parent page.

                    var radGrid = $find("<%= radGrid.ClientID %>"); 
                    oArg.docId = radGrid.get_selectedValue; 

    Do i do it correct or how can i access the radgrid key value of a row via javascript?

    cheers mario
  2. Answer
    Georgi Tunev
    Admin
    Georgi Tunev avatar
    7207 posts

    Posted 22 Jul 2009 Link to this post

    Hi Mario,

    The error indicates that you have some code using <% %> in your page. To avoid it, I would suggest to use RadCodeBlock and RadScriptBlock.

    Greetings,
    Georgi Tunev
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top