我需要使用RadWizard更改NextButton的文本

时间:2015-12-04 14:57:28

标签: c# telerik

我试图从后面的代码更改radwizard中的下一个按钮的文本,有人可以帮助我吗?

我有四个步骤,我希望能够在向导的特定步骤中更改下一个按钮的文本,这是否可能

         <telerik:RadWizard ID="rwzPurchase" runat="server" Height="510px" Width="100%" DisplayProgressBar="false" OnNextButtonClick="rwzPurchase_NextButtonClick1"     DisplayNavigationButtons="true" DisplayCancelButton="true">
         <WizardSteps>
         <%-- Confirmation --%>
        <telerik:RadWizardStep Title="Confirmation">
            <div class="row-fluid">
                <div class="control-group-header margin-bottom-10">
                    <asp:label class="label-greentheme label label-inline-border" ID="LBTitle" runat="server">RP Specific Options</asp:label><br />
                </div>
                <br />                       
            </div>
            <div style="text-align:left">
                <asp:Label ID="LBMessage" runat="server" Font-Size="Large" CssClass="message" />
            </div>
        </telerik:RadWizardStep>

        <%-- Grower Information --%>
        <telerik:RadWizardStep Title="Grower Information">
            <uc1:GrowerInfo runat="server" ID="GrowerInfo" />
        </telerik:RadWizardStep>

        <%-- E-Signature --%>
        <telerik:RadWizardStep Title="E-Signature">
            <uc1:eSigControl runat="server" ID="eSigControl" />
        </telerik:RadWizardStep>

        <%-- Finish --%>
        <telerik:RadWizardStep Title="Finish">
            <div class="container">
                <div class="row-fluid">
                    <div class="control-group-header margin-bottom-10">
                        <asp:Label class="label-greentheme label label-inline-border" ID="LBSuccessTitle" runat="server" /><br />
                    </div>
                    <br />
                    <asp:Label ID="LBSuccessText" runat="server" Font-Size="Large"/>
                </div>
            </div>
        </telerik:RadWizardStep>
    </WizardSteps>
</telerik:RadWizard>

C#

    protected void rwzPurchase_NextButtonClick1(object sender, WizardEventArgs e)
    {
        if (rwzPurchase.ActiveStep.Title == "Grower Information")
        {
            //Here is where I want to change the text of button if we are in this specific step
            RadButton button = (RadButton)sender;
            button.Text = "test";
            this.rwzPurchase.CommandArea.CommandElements.Add(button);
        }
    }

0 个答案:

没有答案