in
Forums
Blogs
Files
Devexpress.Com
Client Center
Support Center
DevExpress Channel

Can't apply filter to the XtraPivotGrid field

Last post 11/20/2008 3:46 AM by Sinyavskiy Sergey. 0 replies.
Page 1 of 1 (1 items)
Sort Posts:
Previous Next
  • 11/20/2008 3:46 AM

    Can't apply filter to the XtraPivotGrid field

       I have a datatable with some data. It's attached to XtraPivotGrid as datasource. One of several columns - a date. I want to get changes, made by user in filter to use later them. Problem in that, what I can not correct to use values of the filter from programme code. As soon as I try to use the filter - in filter does appear nothing checked!

    code (as example in manual):

    ' in the column "Date_Of_Document" of datatable there is following data: 2006, 2007 and 2008 yy.
    ' I do not want to see nothing, connected with 2006 - I exclude it from filter (I'm trying exclude...)
    Dim dateField As PivotGridField = DE_PivotGrid.Fields("Date_Of_Document")
    ' PivotGridControl1.BeginUpdate() - not using now
    Try
    dateField.FilterValues.Clear()
    dateField.FilterValues.Add("2008")
    dateField.FilterValues.Add("2007")
    dateField.FilterValues.FilterType = DevExpress.Data.PivotGrid.PivotFilterType.Included
    Finally
    ' Unlock the control.
    ' PivotGridControl1.EndUpdate()
    End Try

    And here is that I get - ALL filter values was unchecked :(

    We have 3 arrays: FilterValues.Values
    FilterValues.ValuesIncluded
    FilterValues.ValuesExcluded
    debug print give me following:
    Console.WriteLine(dateField.FilterValues.Values.Length.ToString) = 2
    Console.WriteLine(dateField.FilterValues.ValuesIncluded.Length.ToString) = 2
    Console.WriteLine(dateField.FilterValues.ValuesExcluded.Length.ToString) = 3 !!!!!!

    But if user with mouse unchecked "year 2006", in the debug print we see:
    Console.WriteLine(dateField.FilterValues.Values.Length.ToString) = 2
    Console.WriteLine(dateField.FilterValues.ValuesIncluded.Length.ToString) = 2
    Console.WriteLine(dateField.FilterValues.ValuesExcluded.Length.ToString) = 1 !!!!!!

    Like end - adding of values to the filter in code does not take them out of excluded, or I mistaken?

    ______________________________________________________________________________
    tThe problem was solved, see here:
    http://www.devexpress.com/Support/Center/p/B131659.aspx


Page 1 of 1 (1 items)
Copyright © 1998-2008 Developer Express Inc.
ALL RIGHTS RESERVED