我使用ASPxGridView与寻呼,寻呼机设置为下一个:

<SettingsPager
    Mode="ShowPager"
    Position="Bottom"
    Visible="true">

另外我有一个CustomButtonInitialize事件:

protected void gridViewInvoices_CustomButtonInitialize(object sender, ASPxGridViewCustomButtonEventArgs e)
{
    if (!e.IsEditingRow)
    {
        Invoice invoice = (Invoice)gridViewInvoices.GetRow(e.VisibleIndex);
        if (invoice != null)
        {
            if (e.ButtonID == "btnConfirmPayment")
            {
                e.Visible = invoice.PaymentConfirmedDate.HasValue ?
                    DefaultBoolean.False : DefaultBoolean.Default;
            }
        }
    }
}

当我打开的页面与该网格寻呼机消失,但如果我的评论我的CustomButtonInitialize事件:

protected void gridViewInvoices_CustomButtonInitialize(object sender, ASPxGridViewCustomButtonEventArgs e)
{
    /*if (!e.IsEditingRow)
    {
        Invoice invoice = (Invoice)gridViewInvoices.GetRow(e.VisibleIndex);
        if (invoice != null)
        {
            if (e.ButtonID == "btnConfirmPayment")
            {
                e.Visible = invoice.PaymentConfirmedDate.HasValue ?
                    DefaultBoolean.False : DefaultBoolean.Default;
            }
        }
    }*/
}

寻呼机再次出现时,如何解决它,以及如何是寻呼机依赖于该事件( CustomButtonInitialize )?

最好的问候,亚历克斯。

有帮助吗?

解决方案

乔,

尝试也检查这样:

if (e.CellType == GridViewTableCommandCellType.Data)

如果不那么帮助,请联系我们的支持团队,他们可以帮助你找到答案: http://www.devexpress.com/Support/Center/CreateIssue。 ASPX?问题类型=问题

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top