RadGerid与RadComboBox没有回发

时间:2013-06-29 14:23:09

标签: asp.net entity-framework telerik-grid radgrid

我目前在TAB容器中有一个asp.net页面,在asp.net页面上有一个没有通过SqlDataSource附加的材料的搜索框,一旦你单击搜索按钮RadWindow弹出显示详细信息的RadGrid

RadGrid位于UpdatePanel,一旦在RadGrid内点击了编辑按钮,弹出编辑窗口,但是当我尝试选择任何{{1}时如货币,公司和国家/地区,如果在编辑模式下单击RadComboBox按钮,则不会发生回发,也不会触发回发。

使用Update附加RadComboBox内的RadGrid

请参阅以下代码:

EditItemTemplate代码:

ASPX

C#代码:

 <ajaxToolkit:TabPanel runat="server" HeaderText="TabPanel7" ID="TabPanel7">
    <HeaderTemplate>Edit/Delete PO Reports</HeaderTemplate>
    <ContentTemplate>
    <br />        
    <asp:UpdateProgress ID="UpdateProgress2" runat="server" AssociatedUpdatePanelID="UpdatePanel4">
    <ProgressTemplate>
    <div style="background-color: Gray; filter:alpha(opacity=60); opacity:0.60; width: 100%; top: 0px; left: 0px; position: fixed; height: 100%;">
    </div>
      <div style="margin:auto;
          font-family:Trebuchet MS;
          filter: alpha(opacity=100);
          opacity: 1;
          font-size:small;
          vertical-align: middle;
          top: 45%;
          position: fixed;
          right: 45%;
          color: #275721;
          text-align: center;
          background-color: White;
          height: 100px;
          ">
            <table style=" background-color: White; font-family: Sans-Serif; text-align: center; border: solid 1px #275721; color: #275721; width: inherit; height: inherit; padding: 15px;">
            <tr>
            <td style=" text-align: inherit;"><img src="images/loadingIcon.gif" alt="Loading"  /></td>
            <td style=" text-align: inherit;"><span style="font-family: Sans-Serif; font-size: medium; font-weight: bold; font">Loading...</span></td>
            </tr>
            </table>
            </div>
         </ProgressTemplate>
      </asp:UpdateProgress>
      <asp:UpdatePanel ID="UpdatePanel4" runat="server">
            <ContentTemplate>
            Enter a Saudi Aramco PO Number: 
        <telerik:RadComboBox ID="EditPORadComboBox" runat="server" 
            DataSourceID="SAPOSqlDataSource" DataTextField="SA_PO" DataValueField="SA_PO" 
                    MarkFirstMatch="True">
        </telerik:RadComboBox>
                <asp:SqlDataSource ID="SAPOSqlDataSource" runat="server" 
                    ConnectionString="<%$ ConnectionStrings:ROGContext %>" 
                    SelectCommand="SELECT [SA_PO] FROM [PODB]"></asp:SqlDataSource>          
        &nbsp; <asp:Button ID="SearchEditPOButton" runat="server" Text="Search" 
            onclick="SearchEditPOButton_Click" OnClientClick="togglePoppModality" Height="35px" Width="115px" />      
        </ContentTemplate>
        </asp:UpdatePanel>            
        <br />
        <br />                   
        <telerik:RadWindow ID="EditPORadWindow" runat="server" Width="1800px" 
            Height="1000px">
        <ContentTemplate>       
        <asp:UpdatePanel ID="UpdatePanel5" runat="server">
        <ContentTemplate>
        <telerik:RadGrid ID="EditPORadGrid" runat="server" HorizontalAlign="Center"
            CellSpacing="0" GridLines="None" AutoGenerateDeleteColumn="True"
            AutoGenerateEditColumn="True"
            OnUpdateCommand="EditPORadGrid_UpdateCommand" 
            onneeddatasource="EditPORadGrid_NeedDataSource" OnItemDataBound="EditPORadGrid_ItemDataBound" 
            AllowAutomaticUpdates="True" AllowAutomaticDeletes="True" 
            AutoGenerateColumns="False">
        <MasterTableView CommandItemDisplay="Top" DataKeyNames="SA_PO"
            EditMode="PopUp">
            <CommandItemSettings ExportToPdfText="Export to PDF" 
                ShowAddNewRecordButton="False" ShowRefreshButton="True" />
            <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column" 
                Visible="True">
            </RowIndicatorColumn>
            <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column" 
                Visible="True">
            </ExpandCollapseColumn>
            <Columns>
            <telerik:GridBoundColumn DataField="SA_PO"
                        FilterControlAltText="Filter SA_PO column" HeaderText="SA PO" 
                        SortExpression="SA_PO" UniqueName="SA_PO" ReadOnly="true" Visible="false">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="PO_Date"
                        FilterControlAltText="Filter PO_Date column" HeaderText="PO_Date" 
                        SortExpression="PO_Date" UniqueName="PO_Date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Packaging_Details"
                        FilterControlAltText="Filter Packaging_Details column" 
                        HeaderText="Packaging Details" SortExpression="Packaging_Details" 
                        UniqueName="Packaging_Details">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Country_Origin" 
                        FilterControlAltText="Filter Country_Origin column" HeaderText="Country Origin" 
                        SortExpression="Country_Origin" UniqueName="Country_Origin">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Required_Document"
                        FilterControlAltText="Filter Required_Document column" 
                        HeaderText="Required Document" SortExpression="Required_Document" 
                        UniqueName="Required_Document">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Shipping_Label" 
                        FilterControlAltText="Filter Shipping_Label column" HeaderText="Shipping Label" 
                        SortExpression="Shipping_Label" UniqueName="Shipping_Label">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Special_Instruction"
                        FilterControlAltText="Filter Special_Instruction column" 
                        HeaderText="Special Instruction" SortExpression="Special_Instruction" 
                        UniqueName="Special_Instruction">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Payment_Terms"
                        FilterControlAltText="Filter Payment_Terms column" HeaderText="Payment Terms" 
                        SortExpression="Payment_Terms" UniqueName="Payment_Terms">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Mode_Shipment"
                        FilterControlAltText="Filter Mode_Shipment column" HeaderText="Mode of Shipment" 
                        SortExpression="Mode_Shipment" UniqueName="Mode_Shipment">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ExpectedDelivery_Date"
                        FilterControlAltText="Filter ExpectedDelivery_Date column" 
                        HeaderText="Expected Delivery Date" SortExpression="ExpectedDelivery_Date" 
                        UniqueName="ExpectedDelivery_Date">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Material_No" 
                        FilterControlAltText="Filter Material_No column" 
                        HeaderText="Material No" SortExpression="ExpectedDelivMaterial_Noery_Date" 
                        UniqueName="Material_No">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="QTY" 
                        FilterControlAltText="Filter QTY column" HeaderText="QTY" SortExpression="QTY" 
                        UniqueName="QTY">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Unit_Price" 
                        FilterControlAltText="Filter Unit_Price column" HeaderText="Unit Price" 
                        SortExpression="Unit_Price" UniqueName="Unit_Price">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Total_Price" 
                        FilterControlAltText="Filter Total_Price column" HeaderText="Total Price" 
                        SortExpression="Total_Price" UniqueName="Total_Price" ReadOnly="True">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="ROG_PO" 
                        FilterControlAltText="Filter ROG_PO column" HeaderText="ROG PO#" ReadOnly="True" 
                        SortExpression="ROG_PO" UniqueName="ROG_PO">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Product_Line"
                        FilterControlAltText="Filter Product_Line column" HeaderText="Product Line" 
                        SortExpression="Product_Line" UniqueName="Product_Line">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Profile_No"
                        FilterControlAltText="Filter Profile_No column" HeaderText="Profile No" 
                        SortExpression="Profile_No" UniqueName="Profile_No">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="IncoTerms" 
                        FilterControlAltText="Filter IncoTerms column" HeaderText="IncoTerms" 
                        SortExpression="IncoTerms" UniqueName="IncoTerms">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Material_No9COM"
                        FilterControlAltText="Filter Material_No9COM column" 
                        HeaderText="Material No.9COM" SortExpression="Material_No9COM" 
                        UniqueName="Material_No9COM">
                    </telerik:GridBoundColumn>
                    <telerik:GridTemplateColumn UniqueName="Currency" HeaderText="Currency"
                    SortExpression="Currency" FilterControlAltText="Filter Currency column" DataField="Currency" AllowFiltering="true">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "Currency")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="CurrencyRadComboBox2" EnableLoadOnDemand="true" DataTextField="Currency"
                         DataValueField="Currency" AutoPostBack="true" HighlightTemplatedItems="true" Filter="Contains" OnItemsRequested="CurrencyRadComboBox2_ItemsRequested" OnSelectedIndexChanged="CurrencyRadComboBox2_OnSelectedChangedIndex">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Company" HeaderText="Company" SortExpression="Company" 
                    FilterControlAltText="Filter Company column" DataField="Company" AllowFiltering="true">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "Company")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="CompanyRadComboBox" EnableLoadOnDemand="true" DataTextField="Company"
                         DataValueField="Company" AutoPostBack="true" HighlightTemplatedItems="true" Filter="Contains">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridTemplateColumn UniqueName="Country" HeaderText="Country" SortExpression="Country" 
                    FilterControlAltText="Filter Country column" DataField="Country" AllowFiltering="true">
                    <ItemTemplate>
                        <%#DataBinder.Eval(Container.DataItem, "Country")%>
                    </ItemTemplate>
                    <EditItemTemplate>
                        <telerik:RadComboBox runat="server" ID="CountryRadComboBox" EnableLoadOnDemand="true" DataTextField="Country"
                         DataValueField="Country" AutoPostBack="true" HighlightTemplatedItems="true" Filter="Contains">
                        </telerik:RadComboBox>
                    </EditItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn DataField="Product_Description"
                        FilterControlAltText="Filter Product_Description column" 
                        HeaderText="Product Description" SortExpression="Product_Description" 
                        UniqueName="Product_Description">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="Size"
                        FilterControlAltText="Filter Size column" HeaderText="Size" 
                        SortExpression="Size" UniqueName="Size">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn DataField="UOM" 
                        FilterControlAltText="Filter UOM column" HeaderText="UOM" SortExpression="UOM" 
                        UniqueName="UOM">
                    </telerik:GridBoundColumn>
            </Columns>                
            <EditFormSettings CaptionDataField="SA_PO" CaptionFormatString="Edit Saudi Aramco PO No.: {0}">
                <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                </EditColumn>
            </EditFormSettings>
            <PagerStyle PageSizeControlType="RadComboBox" />
        </MasterTableView>
        <ClientSettings>
            <ClientEvents OnRowClick="RowDblClick" />
            <Scrolling AllowScroll="True" UseStaticHeaders="True" />
        </ClientSettings>
        <PagerStyle PageSizeControlType="RadComboBox" />
        <FilterMenu EnableImageSprites="False">
        </FilterMenu>
        </telerik:RadGrid>
        </ContentTemplate>
        </asp:UpdatePanel>
        </ContentTemplate>
        </telerik:RadWindow>
    </ContentTemplate>
    </ajaxToolkit:TabPanel>
</ajaxToolkit:TabContainer>    

0 个答案:

没有答案