We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Returning visible row count

Thread ID:

Created:

Updated:

Platform:

Replies:

22250 Dec 7,2004 05:51 PM Dec 7,2004 06:47 PM Windows Forms 1
loading
Tags: GridControl
Jeff Lancaster
Asked On December 7, 2004 05:51 PM

Is there a property I can use to return the number of rows in a GDBG which are visible (not hidden). I know I can get this with the following code but wonder if there is a more efficient way: AddHandler model.QueryRowCount, AddressOf OnRowCountChanged Protected Sub OnRowCountChanged(ByVal sender As Object, _ ByVal e As Syncfusion.Windows.Forms.Grid.GridRowColCountEventArgs) Dim visible As Integer = 0 For i As Integer = 1 To e.Count - 1 If Grid.Model.Rows.Hidden(i) = False Then visible += 1 End If Next ''do something with the count here End Sub Thanks, Jeff

Administrator [Syncfusion]
Replied On December 7, 2004 06:47 PM

The only properties are grid.TopRowIndex and grid.ViewLayout.LastVisibleRow. But these properties only take into account the rows that are actually visible on the screen. If you have 1000 rows in your grid, and 750 are marked as Hidden, then there is no property that will give you the 250 count of non-hidden rows.

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;