ASPxGridView寻呼机消失了

时间:2010-03-19 10:54:04

标签: paging pager aspxgridview

我使用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;
            }
        }
    }*/
}

Pager再次出现,如何修复它以及寻呼机如何依赖此事件( CustomButtonInitialize )?

最好的问候,Alex。

1 个答案:

答案 0 :(得分:0)

乔,

请尝试检查:

if (e.CellType == GridViewTableCommandCellType.Data)

如果这没有用,那么请联系我们的支持团队,他们可以帮助您解决问题: http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question