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. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Returning visible row count

Thread ID:





22250 Dec 7,2004 10:51 PM UTC Dec 7,2004 11:47 PM UTC WinForms 1
Tags: GridControl
Jeff Lancaster
Asked On December 7, 2004 10:51 PM UTC

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 11:47 PM UTC

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.


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon

Live Chat Icon For mobile
Live Chat Icon