GrapeCity MultiRow Windows Forms Documentation
Getting and Setting the Row Count

You can use the GcMultiRow.RowCount property to get and set the number of rows in the GcMultiRow control.

The row count cannot be changed using the GcMultiRow.RowCount property if the GcMultiRow control is bound to a data source. If the control is bound to a data source, you will need to change the row count (record count) in the data source itself.

Using Code

The following code sets the number of rows in the GcMultiRow control to 200.

[VB]

GcMultiRow1.RowCount = 200

[CS]

gcMultiRow1.RowCount = 200;

The following code outputs the current row count of the GcMultiRow control to the screen.

[VB]

Console.WriteLine(GcMultiRow1.RowCount)

[CS]

Console.WriteLine(gcMultiRow1.RowCount);

The following code gets the number of displayed rows in the GcMultiRow control. Partially displayed rows are also counted.

[VB]

Imports GrapeCity.Win.MultiRow

Dim displayedRowCount As Integer = gcMultiRow1.Rows.GetRowCount(MultiRowElementStates.Displayed)
Console.WriteLine(displayedRowCount)

[CS]

using GrapeCity.Win.MultiRow;

int displayedRowCount = gcMultiRow1.Rows.GetRowCount(MultiRowElementStates.Displayed);
Console.WriteLine(displayedRowCount);

The following code gets the number of rows that are selected in the GcMultiRow control. Partially selected rows are not counted.

[VB]

Imports GrapeCity.Win.MultiRow

Dim selectedRowCount As Integer = gcMultiRow1.Rows.GetRowCount(MultiRowElementStates.Selected)
Console.WriteLine(selectedRowCount)

[CS]

using GrapeCity.Win.MultiRow;

int selectedRowCount = gcMultiRow1.Rows.GetRowCount(MultiRowElementStates.Selected);
Console.WriteLine(selectedRowCount);
See Also

 

 


Copyright © GrapeCity, inc. All rights reserved.

Support Options