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.

GGC Find row index

Thread ID:

Created:

Updated:

Platform:

Replies:

91175 Nov 8,2009 08:31 PM Nov 10,2009 03:29 AM Windows Forms 3
loading
Tags: Grouping
abc
Asked On November 8, 2009 08:31 PM

I am using syncfusion V6.2 grid grouping control. I need to get the total number of records in the grid. the grid for this i am using the following code:
ggc.TableModel.RowCount
I have grouped my grid with one column. The above piece of code works fine when all rows of the grid cell are expanded but when i collapse all rows of the grid or some rows then the row count is not correct. Actually what is happening is it doesn't count the records for collapsed row. Please let me know how to achive this. I want the complete record count irrespective of collapsed or expanded rows.

Rajadurai C [Syncfusion]
Replied On November 9, 2009 03:31 AM

Hi Prabhjeet,

Thanks for your interest in Syncfusion Products.

The total number of records in gridgroupingcontrol can be retrieved through the Table.Records property. This always retrieves the number of records binded in the grid irrespective of its grouping state: collapsed or expanded.

ggc.Table.Records.Count


Regards,
Rajadurai

abc
Replied On November 9, 2009 07:17 PM

The above code "ggc.Table.Records.Count" shows the number of records in grid, but i want the exact number of rows used. Please see the attached image with this query. I want all rows that are displayed in the image.
As per image when we group records there are at least 2 extra rows.



img_7975f2ca.rar

Rajadurai C [Syncfusion]
Replied On November 10, 2009 03:29 AM

Hi Prabhjeet,

If you would like to count the number of rows irrespective of the type it holds. i.e., record, groupcaption, column header, etc., it can be retrieved through the elements count. Here is the code for your reference.

Console.WriteLine(this.gridGroupingControl1.Table.Elements.Count);

This computes the total number of elements present in grid. This count also includes columnheader row. To get rows other than this columnheaderrow, you have to check for the respective element, and calculate count by iterating through the Elements collection in grid.

Regards,
Rajadurai

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.

;