GrapeCity.Xaml.SpreadSheet.UI
ColumnWidthChanging Event (GcSpreadSheet)
Example 


GrapeCity.Xaml.SpreadSheet.UI Namespace > GcSpreadSheet Class : ColumnWidthChanging Event
Occurs when the column width is changing.
Syntax
'Declaration
 
Public Event ColumnWidthChanging As EventHandler(Of ColumnWidthChangingEventArgs)
'Usage
 
Dim instance As GcSpreadSheet
Dim handler As EventHandler(Of ColumnWidthChangingEventArgs)
 
AddHandler instance.ColumnWidthChanging, handler
public event EventHandler<ColumnWidthChangingEventArgs> ColumnWidthChanging
Event Data

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

PropertyDescription
(Inherited from System.ComponentModel.CancelEventArgs)
Gets the list of columns whose widths are changing.  
Gets whether the column indexes are row header columns.  
Example
This example uses the ColumnWidthChanging event.
gcSpreadSheet1.AddColumnViewport(0, 100);
gcSpreadSheet1.AddRowViewport(0, 80);

private void gcSpreadSheet1_ColumnViewportWidthChanged(object sender, GrapeCity.Xaml.SpreadSheet.UI.ColumnViewportWidthChangedEventArgs e)
        {
            listBox1.Items.Add(e.DeltaViewportWidth.ToString());
            listBox1.Items.Add(e.ViewportIndex.ToString());
        }

private void gcSpreadSheet1_ColumnViewportWidthChanging(object sender, GrapeCity.Xaml.SpreadSheet.UI.ColumnViewportWidthChangingEventArgs e)
        {
            listBox1.Items.Add(e.DeltaViewportWidth.ToString());
            listBox1.Items.Add(e.ViewportIndex.ToString());
        }

private void gcSpreadSheet1_ColumnWidthChanged(object sender, GrapeCity.Xaml.SpreadSheet.UI.ColumnWidthChangedEventArgs e)
        {
            listBox1.Items.Add(e.ColumnList.Length.ToString());
            listBox1.Items.Add(e.Header.ToString());
        }

private void gcSpreadSheet1_ColumnWidthChanging(object sender, GrapeCity.Xaml.SpreadSheet.UI.ColumnWidthChangingEventArgs e)
        {
            listBox1.Items.Add(e.ColumnList.Length.ToString());
            listBox1.Items.Add(e.Header.ToString());
        }
GcSpreadSheet1.AddColumnViewport(0, 100)
GcSpreadSheet1.AddRowViewport(0, 80)

Private Sub GcSpreadSheet1_ColumnViewportWidthChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ColumnViewportWidthChangedEventArgs) Handles GcSpreadSheet1.ColumnViewportWidthChanged
        ListBox1.Items.Add(e.DeltaViewportWidth.ToString())
        ListBox1.Items.Add(e.ViewportIndex.ToString())
    End Sub

Private Sub GcSpreadSheet1_ColumnViewportWidthChanging(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ColumnViewportWidthChangingEventArgs) Handles GcSpreadSheet1.ColumnViewportWidthChanging
        ListBox1.Items.Add(e.DeltaViewportWidth.ToString())
        ListBox1.Items.Add(e.ViewportIndex.ToString())
    End Sub

Private Sub GcSpreadSheet1_ColumnWidthChanged(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ColumnWidthChangedEventArgs) Handles GcSpreadSheet1.ColumnWidthChanged
        ListBox1.Items.Add(e.ColumnList.Length.ToString())
        ListBox1.Items.Add(e.Header.ToString())
    End Sub

Private Sub GcSpreadSheet1_ColumnWidthChanging(sender As Object, e As GrapeCity.Xaml.SpreadSheet.UI.ColumnWidthChangingEventArgs) Handles GcSpreadSheet1.ColumnWidthChanging
        ListBox1.Items.Add(e.ColumnList.Length.ToString())
        ListBox1.Items.Add(e.Header.ToString())
    End Sub
See Also