Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7085643
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:26:59+00:00 2026-05-28T07:26:59+00:00

I am currently using DevExpress 10.2 within Visual Studio 2010. In a previous question

  • 0

I am currently using DevExpress 10.2 within Visual Studio 2010. In a previous question I was trying to print the current user view of a DevExpress GridControl with the user’s choice of expanded or collapsed master rows and/or group sections. I was told this was not possible at this time. I have now decided to use the following code:

gvPOinvoiceBanded.OptionsPrint.ExpandAllGroups = False
gvPOinvoiceBanded.OptionsPrint.ExpandAllDetails = False

when I want it to be completely collapsed while printing as by default these are set to true.

I was just wondering if there is someway to check either the total number of expanded master rows or the total number of collapsed master rows. I would also like to do the same thing for the groups as you can have the groups expanded while the master rows are not.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:27:00+00:00Added an answer on May 28, 2026 at 7:27 am

    You can get the number of expanded group rows using a loop like this:

        Dim ExpandedGroupCount As Integer = 0
        Dim Handle As Integer = -1  'group rows have negative row handles
        Do Until GridView1.GetRow(Handle) Is Nothing
            If GridView1.GetRowExpanded(Handle) Then
                ExpandedGroupCount += 1
            End If
            Handle -= 1
        Loop
        'Do whatever with expanded group count
        MsgBox(String.Format("Number of Expanded Group Rows: {0}{2}Number of Group Rows: {1}",
              ExpandedGroupCount, Math.Abs(Handle + 1), Environment.NewLine))
    

    Similarly, you can do this to get the count of expanded master rows:

        Handle = 0
        Dim ExpandedMasterRowCount As Integer = 0
        Do Until GridView1.GetRow(Handle) Is Nothing
            If GridView1.IsMasterRow(Handle) Then
                If GridView1.GetMasterRowExpanded(Handle) Then
                    ExpandedMasterRowCount += 1
                End If
            End If
            Handle += 1
        Loop
        MsgBox(String.Format("Number of Expanded Master Rows: {0}", ExpandedMasterRowCount))
    

    Of course, if you are only checking so that you can see if you need to set the collapse this probably isn’t worth the effort. There is no direct property that provides the counts you are looking for.

    You could also probably use the events that fire when rows are collapsed and expanded to track the count as it changes. You have to be careful with that though because the event only fires once when expand or collapse all happens. So if you go with that method be sure to check the rowHandle in the event arguments parameter for GridControl.InvalidRowHandle. That is the value used in the case of collapse or expand all.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am currently programming within Visual Studio 2010 using VB.Net and DevExpress V10.2 Winforms.
I am currently programming in Visual Studio 2010 within VB.NET and am using DevExpress
I am currently using DevExpress 11.2 within Visual Studio 2010. Currently I am using
I am currently using DevExpress 10.2 within Visual Studio 2010. I am printing the
I am currently using Visual Studio 2008 with Devexpress 10.2. My sum for some
I am using a DevExpress (10.2) Treelist in my VB.Net project in Visual Studio
I am currently using Visual Studio 2008 (VB.Net) and SQL Server 2008. I have
I am using DevExpress.XtraEditors.LookUpEdit to display the information about the classes available. Currently it
Im currently using codeigniter to build a messaging system and im trying to stay
Currently using Telerik ASP .NET MVC Controls version 2011.2.712 Hello all, I am trying

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.