ASPxGridView 分页器消失

发布于 2024-08-26 04:29:28 字数 1377 浏览 5 评论 0原文

我将 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)吗?

最好的问候,亚历克斯。

I use the ASPxGridView with paging, pager settings is next:

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

Also I have a CustomButtonInitialize event:

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;
            }
        }
    }
}

When I open the page with this grid the pager disappears but if I comment my CustomButtonInitialize event:

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 appears again, how can I fix it and how is pager depend on this event (CustomButtonInitialize)?

Best regards, Alex.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

等风来 2024-09-02 04:29:28

乔,

也尝试检查一下:

if (e.CellType == GridViewTableCommandCellType.Data)

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

Jo,

Try also checking this:

if (e.CellType == GridViewTableCommandCellType.Data)

If that doesn't help then please contact our support team and they can help you figure it out:
http://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype=Question

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文