Intersoft ClientUI Documentation
PageDescriptor Property (QueryDescriptor)



Syntax
Public Property PageDescriptor As PageDescriptor
Dim instance As QueryDescriptor
Dim value As PageDescriptor
 
instance.PageDescriptor = value
 
value = instance.PageDescriptor
public PageDescriptor PageDescriptor {get; set;}
public:
property PageDescriptor^ PageDescriptor {
   PageDescriptor^ get();
   void set (    PageDescriptor^ value);
}
Remarks
The PageDescriptors is a property that contains information about data paging.
Example

The following example shows how to instantiate a QueryDescriptor programmatically and demonstrate the use of FilterDescriptors, SortDescriptors and PageDescriptors in the QueryDescriptor object.

CS
Copy Code
QueryDescriptor queryDescriptor = new QueryDescriptor();

// filtering
// get records that have
// (UnitPrice >= 0 AND UnitPrice < 50) OR (UnitPrice == 0)
CompositeFilterDescriptorCollection groupFilter1 = new CompositeFilterDescriptorCollection();

groupFilter1.LogicalOperator = FilterCompositionLogicalOperator.And;
groupFilter1.Add(
    new FilterDescriptor()
    {
        PropertyName = "UnitPrice",
        Operator = FilterOperator.IsGreaterThanOrEqualTo, Value = 0
    }
);
groupFilter1.Add(
    new FilterDescriptor()
    {
        PropertyName = "UnitPrice",
        Operator = FilterOperator.IsLessThan, Value = 50
    }
);

CompositeFilterDescriptorCollection groupFilter2 = new CompositeFilterDescriptorCollection();

groupFilter2.LogicalOperator = FilterCompositionLogicalOperator.And;
groupFilter2.Add(
    new FilterDescriptor()
    {
        PropertyName = "UnitsInStock",
        Operator = FilterOperator.IsEqualTo, Value = 0
    }
);

queryDescriptor.FilterDescriptors.LogicalOperator = FilterCompositionLogicalOperator.Or;

queryDescriptor.FilterDescriptors.Add(groupFilter1);
queryDescriptor.FilterDescriptors.Add(groupFilter2);

// paging
// get the record 6 - 10
queryDescriptor.PageDescriptor.PageSize = 5;
queryDescriptor.PageDescriptor.PageIndex = 1;

// sorting
// sort by category ascending then by product id descending
queryDescriptor.SortDescriptors.Add(
    new SortDescriptor()
    {
        PropertyName = "CategoryID",
        Direction = System.ComponentModel.ListSortDirection.Ascending
    }
);
queryDescriptor.SortDescriptors.Add(
    new SortDescriptor()
    {
        PropertyName = "ProductID",
        Direction = System.ComponentModel.ListSortDirection.Descending
    }
);    
Requirements

Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

See Also

Reference

QueryDescriptor Class
QueryDescriptor Members

Send Feedback