Spread Silverlight Documentation
RangeFiltering Event (GcSpreadSheet)
Example 


Occurs when a column is about to be automatically filtered.
Syntax
'Declaration
 
Public Event RangeFiltering As System.EventHandler(Of RangeFilteringEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As System.EventHandler(Of RangeFilteringEventArgs)
 
AddHandler instance.RangeFiltering, handler
public event System.EventHandler<RangeFilteringEventArgs> RangeFiltering
Event Data

The event handler receives an argument of type RangeFilteringEventArgs containing data related to this event. The following RangeFilteringEventArgs properties provide information specific to this event.

PropertyDescription
Cancel (Inherited from System.ComponentModel.CancelEventArgs)
ColumnGets the index of the column to be automatically filtered.  
FilterValuesGets the values to filter the column by.  
Example
This example uses the RangeFiltering event. 
GrapeCity.Windows.SpreadSheet.Data.CellRange cellrange = new GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 5, 1);
GrapeCity.Windows.SpreadSheet.Data.HideRowFilter hideRowFilter = new GrapeCity.Windows.SpreadSheet.Data.HideRowFilter(cellrange);
gcSpreadSheet1.Sheets[0].RowFilter = hideRowFilter;

private void gcSpreadSheet1_RangeFiltered(object sender, GrapeCity.Windows.SpreadSheet.UI.RangeFilteredEventArgs e)
        {
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.FilterValues[0].ToString());
        }

private void gcSpreadSheet1_RangeFiltering(object sender, GrapeCity.Windows.SpreadSheet.UI.RangeFilteringEventArgs e)
        {
            listBox1.Items.Add(e.Column.ToString());
            listBox1.Items.Add(e.FilterValues[0].ToString());
        }

private void gcSpreadSheet1_RangeSorted(object sender, GrapeCity.Windows.SpreadSheet.UI.RangeSortedEventArgs e)
        {
            listBox1.Items.Add(e.Ascending.ToString());
            listBox1.Items.Add(e.Column.ToString());
        }

private void gcSpreadSheet1_RangeSorting(object sender, GrapeCity.Windows.SpreadSheet.UI.RangeSortingEventArgs e)
        {
            listBox1.Items.Add(e.Ascending.ToString());
            listBox1.Items.Add(e.Column.ToString());
        }
Dim cellrange As New GrapeCity.Windows.SpreadSheet.Data.CellRange(0, 0, 5, 1)
Dim hideRowFilter As New GrapeCity.Windows.SpreadSheet.Data.HideRowFilter(cellrange)
GcSpreadSheet1.Sheets(0).RowFilter = hideRowFilter
 
    Private Sub GcSpreadSheet1_RangeFiltered(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.RangeFilteredEventArgs) Handles GcSpreadSheet1.RangeFiltered
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.FilterValues(0).ToString())
    End Sub

    Private Sub GcSpreadSheet1_RangeFiltering(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.RangeFilteringEventArgs) Handles GcSpreadSheet1.RangeFiltering
        ListBox1.Items.Add(e.Column.ToString())
        ListBox1.Items.Add(e.FilterValues(0).ToString())
    End Sub

    Private Sub GcSpreadSheet1_RangeSorted(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.RangeSortedEventArgs) Handles GcSpreadSheet1.RangeSorted
        ListBox1.Items.Add(e.Ascending.ToString())
        ListBox1.Items.Add(e.Column.ToString())
    End Sub

    Private Sub GcSpreadSheet1_RangeSorting(sender As System.Object, e As GrapeCity.Windows.SpreadSheet.UI.RangeSortingEventArgs) Handles GcSpreadSheet1.RangeSorting
        ListBox1.Items.Add(e.Ascending.ToString())
        ListBox1.Items.Add(e.Column.ToString())
    End Sub
Requirements

Target Platforms: Windows 7, Windows 8 Desktop, Windows Vista SP1 or later, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members

 

 


Copyright © GrapeCity, inc. All rights reserved.