Ticket Q395594
Visible to All Users

How to hide group by box programmatically

created 13 years ago

I created an xtragrid datagrid dynamically and it displays group by box by default at the top. How can I hide this programmatically? I cannot find the property to do it. Thanks.

Comments (2)
DevExpress Support Team 13 years ago

    Hi Genaro,
    Thank you for contacting us. I'm afraid this issue isn't clear to me. Would you please provide a couple of screenshots to illustrate actual and desired behavior?
    I am looking forward to your response.
    Thanks,
    Gosha

    SK SK
    Sreekanth Kommana 13 years ago

      From the attached picture, the one eclosed by red box, I want to hide that panel programmatically. Here's a snippet of my code where I want to do it:
                      tabMasterSearch.TabPages[i].Controls.Add(new DevExpress.XtraGrid.GridControl());
                      DevExpress.XtraGrid.GridControl gc = (DevExpress.XtraGrid.GridControl)tabMasterSearch.TabPages[i].Controls[0];
                      if (i > 0)
                      {
                          tabMasterSearch.TabPages[i].Width = tabMasterSearch.TabPages[i - 1].Width;
                          tabMasterSearch.TabPages[i].Height = tabMasterSearch.TabPages[i - 1].Height;
                      }
                      gc.Left = 10;
                      gc.Top = 10;
                      gc.Width = tabMasterSearch.TabPages[i].Width - 20;
                      gc.Height = tabMasterSearch.TabPages[i].Height - 20;
                      gc.??? <------- what property do I need to set to hide that panel?
      Let me know if you need more info.

      Answers

      created 13 years ago (modified 13 years ago)

      Hi Genaro,
      Thank you for your clarification. To do this, get a GridView of your GridControl via the GridControl.MainView property and set the GridView.OptionsView.ShowGroupPanel to false.

      C#
      GridView gv = (GridView)gc.MainView; gv.OptionsView.ShowGroupPanel = false;

      Thanks,
      Gosha

        Comments (2)
        SK SK
        Sreekanth Kommana 13 years ago

          Thank you for your suggestion. My app is working fine now.

          DevExpress Support Team 13 years ago

            Hi Genaro,
            I am glad that my assistance was helpful to you.
            Please feel free to ask us questions on any further problems you may have. We are glad to help you at any time.
            Thanks,
            Gosha

            Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

            Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.