Exemple #1
0
        protected void ASPxgvReceipts_ProcessOnClickRowFilter(object sender, ASPxGridViewOnClickRowFilterEventArgs e)
        {
            if (string.IsNullOrEmpty(ASPxgvReceipts.FilterExpression.Trim()))
            {
                ASPxgvReceipts.DataSourceID = null;
            }
            else
            {
                ASPxgvReceipts.DataSourceID = "dsReceipts";

                ASPxgvReceipts.DataBind();
            }
        }
Exemple #2
0
        protected void ASPxgvReceipts_CustomButtonInitialize(object sender, ASPxGridViewCustomButtonEventArgs e)
        {
            e.Visible = DefaultBoolean.False;

            if (e.CellType == GridViewTableCommandCellType.Filter)
            {
                return;
            }

            var _rowdata = ASPxgvReceipts.GetRowValues(e.VisibleIndex, "TaxType");

            if (e.ButtonID == "btnCreditNotes" && _rowdata != null)
            {
                string _taxType = _rowdata.ToString();
                e.Visible = _taxType == "Withholding Tax" ? DefaultBoolean.True : DefaultBoolean.False;
            }
        }