我有一个结帐过程嵌套在手风琴控件中:
计费地址
运输地址
运输方法
信用卡信息
订单摘要
我想将启用状态设置为在页面加载(收费地址除外(,然后在用户完成信息并单击每个窗格中的"继续"按钮时依次启用每个窗格。
当前,一切都按我想要的方式工作,除了所有窗格始终启用。
我需要一个服务器端代码,以便每次继续单击我可以启用或禁用Accorion Pane。
还需要一个代码,单击计费地址窗格所有其他sectionpane都应禁用我尝试了以下代码,但它不起作用。
BillingInformation.HeaderContainer.Enabled = false;
ShippingInformation.HeaderContainer.Enabled = false;
resolved
在页面加载事件上我曾经写
if (!IsPostBack)
{
BillingInformation.HeaderContainer.Style.Add("pointer-events", "auto");
ShippingInformation.HeaderContainer.Style.Add("pointer-events", "none");
DelieveryMethodsPanel.HeaderContainer.Style.Add("pointer-events", "none");
PromoCode.HeaderContainer.Style.Add("pointer-events", "none");
PaymentInformation.HeaderContainer.Style.Add("pointer-events", "none");
}
以及继续单击计费信息,我用来编写代码,如下所示,只有帐单和运输信息才能启用,否则所有这些都将被禁用。我只是在改变班级的风格,通过这些样式将获得启用/禁用。
public void Continue1()
{
BillingInformation.HeaderContainer.Style.Add("pointer-events", "auto");
BillingInformation.HeaderContainer.Style.Add("cursor", "pointer");
ShippingInformation.HeaderContainer.Style.Add("pointer-events", "auto");
ShippingInformation.HeaderContainer.Style.Add("cursor", "pointer");
DelieveryMethodsPanel.HeaderContainer.Style.Add("pointer-events", "none");
PromoCode.HeaderContainer.Style.Add("pointer-events", "none");
PaymentInformation.HeaderContainer.Style.Add("pointer-events", "none");
}