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.
How to hide group by box programmatically
Answers
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
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
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
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.