2012-02-27 7 views
0

私のaspxページには、RadWindowを含むRadPageViewがあり、RadGridはRadWindowの内部にあります。 (つまり、RadMultiPage - > RadPageView - > RadWindow - > RadGrid)。RadWindow内のRadGridでグリッドソートに問題がある

<telerik:RadWindow EnableShadow="true" ShowContentDuringLoad="false" runat="server" 
             ReloadOnShow="true" Title="Standard Text: Add Observation." OpenerElementID="lnkObservationsText" 
             Behaviors="None" VisibleStatusbar="false" EnableViewState="true" ID="rdWndObservationText" 
             Skin="Web20" Modal="true" Width="600"> 
             <ContentTemplate> 
              <div class="RadModalMainDiv"> 
               <div> 
                <p> 
                 Help text to go here....</p> 
               </div> 
               <div class="divStandardTextButtonList"> 
                <asp:Button ID="btnObservationsTextSelect" runat="server" Text="Select" CssClass="btnStandardText" 
                 OnClientClick="return ObservationStandardText_Confirm()" /> 
                <asp:Button ID="btnObservationsTextCancel" runat="server" Text="Cancel" CssClass="btnStandardText" /> 
               </div> 
               <asp:Panel ID="pnl1" runat="server"> 
                <div> 
                 <telerik:RadGrid ID="radGdObservationsText" runat="server" AllowPaging="True" AllowSorting="True" 
                  AutoGenerateColumns="False" GridLines="None" PageSize="10" Width="100%"> 
                  <MasterTableView CommandItemDisplay="None" Name="ParentGrid"> 
                   <Columns> 
                    <telerik:GridClientSelectColumn UniqueName="ClientSelectColumn"> 
                    </telerik:GridClientSelectColumn> 
                    <telerik:GridBoundColumn DataField="description" HeaderText="Observation Description" 
                     Visible="true"> 
                    </telerik:GridBoundColumn> 
                   </Columns> 
                  </MasterTableView> 
                  <PagerStyle Mode="NextPrevAndNumeric" /> 
                  <ClientSettings> 
                   <Selecting AllowRowSelect="True" /> 
                   <ClientEvents OnRowSelected="SetObservationStandardText" /> 
                  </ClientSettings> 
                 </telerik:RadGrid> 
                </div> 
               </asp:Panel> 
              </div> 
             </ContentTemplate> 
            </telerik:RadWindow> 

私は、ヘッダ上のグリッド・クリックをソートしてみてください、ページが更新されRadWindowが消えます。ソートは、ソートされた行のRadGridを再度開くと発生します。私はRadGridを壊して同じ状態にしておく必要があります。 以前にもありがとうございました。

答えて

0

RadWindowを手動で再度開く必要があります。より簡単なアプローチをお勧めします。ウィンドウを閉じる/開くボタンの

クリックハンドラ:OpenerElementIDを外し、RadWindowと下図のように、それを閉じ、他の1を開くのボタンを変更するための

void lnkObservationsText_Click(object sender, EventArgs e) 
{ 
    rdWndObservationText.VisibleOnPageLoad = !rdWndObservationText.VisibleOnPageLoad; 
} 

をクリックハンドラのコードRadWindow自体にある[閉じる]ボタン

void btnObservationsTextCancel_Click(object sender, EventArgs e) 
{ 
    rdWndObservationText.VisibleOnPageLoad = false; 
} 

この場合、ReloadOnShowを使用する必要はありません。

これが役に立ちます。幸運:)

関連する問題