Class GridRowColCountEventArgs
Provides data about the QueryColCount, QueryRowCount, SaveColCount, and SaveRowCount events which can be marked as handled.
Inheritance
Inherited Members
Namespace: Syncfusion.Windows.Forms.Grid
Assembly: Syncfusion.Grid.Windows.dll
Syntax
public sealed class GridRowColCountEventArgs : SyncfusionHandledEventArgs
Remarks
GridRowColCountEventArgs is a custom event argument class used by the QueryColCount, QueryRowCount, SaveColCount, and SaveRowCount events to query or save the row and column count of the grid.
This event allows you to customize the grid dimensions at run-time on demand before the grid is drawn or programmatically accessed through RowCount ColCount.
If you made changes to Count, you should also set Handled to True. QueryColCount and QueryRowCount will return Count as the actual number of rows or columns when the event is marked as handled. Otherwise, the grid will check its own data store Data. In the default case when the event is not marked as handled, the grid will locate row and column count by calling ColCount and RowCount.
In SaveColCount and SaveRowCount the grid will not store row and column count if you marked the event as handled. Otherwise, in the default case that the event is not marked as handled the row and column count is stored by setting the ColCount and RowCount properties.
See VirtualGrid sample code for example.
note
The intention of this event is to store and retrieve data. See GridRangeInsertedEventArgs and GridRangeRemovedEventArgs for the related UI event after changes were made to the data store.
Constructors
GridRowColCountEventArgs()
Initializes the new instances of the GridRowColCountEventArgs class.
Declaration
public GridRowColCountEventArgs()
GridRowColCountEventArgs(Int32)
Initializes the new instances of the GridRowColCountEventArgs class.
Declaration
public GridRowColCountEventArgs(int count)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | count | The number of rows or columns to be returned by this event. |
Properties
Count
Gets or sets the number of rows or columns to be returned by this event.
Declaration
[TraceProperty(true)]
public int Count { get; set; }
Property Value
Type |
---|
System.Int32 |
Remarks
Changing this value will only affect QueryColCount and QueryRowCount.
SaveColCount and SaveRowCount will ignore changes to this value.