开发者

ASPxGridView Pager disappears

开发者 https://www.devze.com 2022-12-23 05:13 出处:网络
I use th开发者_高级运维e ASPxGridView with paging, pager settings is next: <SettingsPager Mode=\"ShowPager\"

I use th开发者_高级运维e 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号