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

Pagerが再び表示されますが、どうすれば修正できますか?Pagerはこのイベント(CustomButtonInitialize)にどのように依存しますか?

よろしく、アレックス。

4

1 に答える 1

0

ジョー、

これもチェックしてみてください:

if (e.CellType == GridViewTableCommandCellType.Data)

それでも問題が解決しない場合は、サポートチームに連絡してください。サポートチームがそれを理解するのに役立ちます: http ://www.devexpress.com/Support/Center/CreateIssue.aspx?issuetype = Question

于 2010-03-22T08:34:16.830 に答える