protected void Grid_ProcessColumnAutoFilter(object sender, DevExpress.Web.ASPxGridViewAutoFilterEventArgs e)
    {
        var grid = (ASPxGridView)sender;

        if (e.Column.FieldName == SpecialFilterColumnFieldName && e.Kind == GridViewAutoFilterEventKind.CreateCriteria)
        {
            grid.FilterExpression = UpdateGridFilterExpression(grid, e);
            e.Criteria            = null;
        }
    }
 protected void testGrid_ProcessColumnAutoFilter(object sender, DevExpress.Web.ASPxGridViewAutoFilterEventArgs e)
 {
     if (e.Value == "|")
     {
         return;
     }
     if (e.Column.FieldName != "OrderDate")
     {
         return;
     }
     if (e.Kind == GridViewAutoFilterEventKind.CreateCriteria)
     {
         String[] dates = e.Value.Split('|');
         Session["DateFilterText"] = dates[0] + " - " + dates[1];
         DateTime dateFrom = Convert.ToDateTime(dates[0]), dateTo = Convert.ToDateTime(dates[1]);
         e.Criteria = (new OperandProperty("OrderDate") >= dateFrom) & (new OperandProperty("OrderDate") < dateTo);
     }
 }
Beispiel #3
0
    protected void ASPxGridView1_ProcessColumnAutoFilter(object sender, DevExpress.Web.ASPxGridViewAutoFilterEventArgs e)
    {
        if (e.Column.FieldName != "OrderDate")
        {
            return;
        }

        if (e.Kind == DevExpress.Web.GridViewAutoFilterEventKind.CreateCriteria)
        {
            if (DateTime.TryParse(e.Value, CultureInfo.InvariantCulture, DateTimeStyles.None, out curDate))
            {
                BinaryOperator op1  = new BinaryOperator("OrderDate", curDate, BinaryOperatorType.GreaterOrEqual);
                BinaryOperator op2  = new BinaryOperator("OrderDate", curDate.AddMinutes(1), BinaryOperatorType.Less);
                GroupOperator  grOp = new GroupOperator(GroupOperatorType.And, op1, op2);
                e.Criteria  = grOp;
                displayText = curDate.ToString("dd-MMMM-yyyy hh:mm");
            }
        }

        if (e.Kind == DevExpress.Web.GridViewAutoFilterEventKind.ExtractDisplayText)
        {
            e.Value = displayText;
        }
    }
Beispiel #4
0
 protected void grvData_ProcessColumnAutoFilter(object sender, DevExpress.Web.ASPxGridViewAutoFilterEventArgs e)
 {
     Search();
 }