2015-11-02 102 views
0

我有一個有趣的錯誤發生,其中我的ajaxtoolkit:ValidatorCalloutExtender的任何一個都不會顯示,除了第一個多個ValidatorCalloutExtender的不顯示

我有4 RadDatePickers(坐在asp:Wizard之內),如果我在第一個日期選擇器中選擇一個日期,那麼點擊其他ajaxtoolkit:ValidatorCalloutExtender的彈出窗口中的任何一個。請注意驗證程序正在工作並停止前進到下一步,但標註擴展程序彈出窗口不顯示。

任何想法出了什麼問題?

完整的工作文件可以在這裏下載; FileHosting

<asp:Wizard ID="wzdRegister" runat="server" DisplaySideBar="False" FinishCompleteButtonText="Submit" ActiveStepIndex="0"> 

    <WizardSteps> 
     <asp:WizardStep ID="wzsIdentification" runat="server" Title="Identification"> 

      <telerik:RadDatePicker ID="Expiry" runat="server" ></telerik:RadDatePicker> 
      <asp:RequiredFieldValidator ID="rfvExpiry" runat="server" ErrorMessage="Expiry is a required field" 
       ControlToValidate="Expiry" Text="*" /> 
      <ajaxtoolkit:ValidatorCalloutExtender ID="vcerfvExpiry" runat="Server" TargetControlID="rfvExpiry" Width="350px" HighlightCssClass="highlight" 
       WarningIconImageUrl="warning.gif" CloseImageUrl="close.gif" /> 
      <br /> 

      <telerik:RadDatePicker ID="RadDatePicker1" runat="server" ></telerik:RadDatePicker> 
      <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Expiry is a required field" 
       ControlToValidate="RadDatePicker1" Text="*" /> 
      <ajaxtoolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="Server" TargetControlID="RequiredFieldValidator1" Width="350px" HighlightCssClass="highlight" 
       WarningIconImageUrl="warning.gif" CloseImageUrl="close.gif" /> 
      <br /> 

      <telerik:RadDatePicker ID="RadDatePicker2" runat="server" ></telerik:RadDatePicker> 
      <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="Expiry is a required field" 
       ControlToValidate="RadDatePicker2" Text="*" /> 
      <ajaxtoolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="Server" TargetControlID="RequiredFieldValidator2" Width="350px" HighlightCssClass="highlight" 
       WarningIconImageUrl="warning.gif" CloseImageUrl="close.gif" /> 
      <br /> 

      <telerik:RadDatePicker ID="RadDatePicker3" runat="server" ></telerik:RadDatePicker> 
      <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ErrorMessage="Expiry is a required field" 
       ControlToValidate="RadDatePicker3" Text="*" /> 
      <ajaxtoolkit:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="Server" TargetControlID="RequiredFieldValidator3" Width="350px" HighlightCssClass="highlight" 
       WarningIconImageUrl="warning.gif" CloseImageUrl="close.gif" /> 
      <br /> 
     </asp:WizardStep> 

     <asp:WizardStep ID="WizardStep1" runat="server" Title="Identification"> 
      Step 2 
     </asp:WizardStep> 

     <asp:WizardStep ID="WizardStep2" runat="server" Title="Identification"> 
      Final Step 
     </asp:WizardStep> 

    </WizardSteps> 

    <StartNavigationTemplate> 
     <input type="button" id="btnAccept" class="hidden" title="Accept" value="Accept" onclick="return false;" class="btn" /> 
     <asp:Button ID="btnNext" runat="server" CommandName="MoveNext" Text="Next" class=" btnNext" /> 
     <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" Visible="false" class="btn" CausesValidation="false" /> 
     <asp:Button ID="btnSave" runat="server" Text="Submit" OnClick="btnSave_Click" Visible="false" class="btn" /> 
    </StartNavigationTemplate> 

    <StepNavigationTemplate> 
     <asp:Button ID="btnPrevious" runat="server" CommandName="MovePrevious" Text="Previous" CausesValidation="false" class="btn" /> 
     <asp:Button ID="btnNext" runat="server" CommandName="MoveNext" Text="Next" class="btn" /> 
     <asp:Button ID="btnCancel" runat="server" Text="Cancel" OnClick="btnCancel_Click" Visible="false" class="btn" CausesValidation="false" /> 
     <asp:Button ID="btnSave" runat="server" Text="Submit" OnClick="btnSave_Click" Visible="false" class="btn" /> 
    </StepNavigationTemplate> 

    <FinishNavigationTemplate> 
     <asp:Button ID="btnSubmit" runat="server" CommandName="MoveComplete" Text="Submit" class="btnNext" /> 
    </FinishNavigationTemplate> 
</asp:Wizard> 
+0

如果我們用簡單的asp替換telerik:RadDatePicker:TextBox的結果會是一樣的嗎? –

回答

1

這是設計。如果你看一看ValidatorCallout.js Show()函數,你會看到線:

if(Sys.Extended.UI.ValidatorCalloutBehavior._currentCallout != null) 
    return; 

這可以防止未來標註打開。 你可以簡單地刪除這些行和/或發佈問題到Ajax Control Toolkit問題跟蹤器:https://ajaxcontroltoolkit.codeplex.com/workitem/list/basic