Forum
Sign Up
× DataGrid for Qt.C++

how to disable the group area and the menu at left

12 years 7 months ago #1 by
Hi,
how can i disable the group area at the top of the grid and the menu at the left of the header rows (see screenshot) ?
Attachments:

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
12 years 7 months ago #2 by Developer Machines
Please try the following code:

view->options().setColumnsQuickCustomization(false)
or
view->options().setBandsQuickCustomization(false) (if you have banded view)

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #3 by
Ok, the icon of the band row is now disable, but i want also disable the menu and do the same for the column header line. Also i will hide the line with the text 'Drag a column header here ...'.

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
12 years 7 months ago #4 by Developer Machines
To hide group header please use:
view->options().setGroupsHeader(false)

To customize grid menu please attach to the signal void contextMenu(QObject* sender, ContextMenuEventArgs* args); of the view. The parameter args holds the reference to the QMenu contextMenu(). You can customize it for your needs (add action, remove action and etc.).
To get the type of the element on which menu has been invoked please use GridHitInfo* ContextMenuEventArgs::hitInfo() function.

To just hide the menu set to false the setHandled(false) property for the ContextMenuEventArgs object.

Please Log in or Create an account to join the conversation.

More
12 years 7 months ago #5 by
1. I set view->options().setFilterEnabled(false); , but when i click at the top left corner of the ban or the column header the filter menu will be open.

2. Could you make me an exmaple for customize teh context menu?

3. I want to set teh alignment for the ban and the column header to center. How can i do this?

Please Log in or Create an account to join the conversation.

  • 's Avatar Topic Author
  • Not Allowed: to create new topic.
  • Not Allowed: to reply.
  • Not Allowed: to edit your message.
Moderators: Developer Machines
Time to create page: 0.152 seconds

Developer Newsletter

Join our Developer Machines newsletter to get informed on all the latest releases of the commercial components for Qt.C++, Delphi FireMonkey, updates and general knowledges.

Quick Support

Should you need any additional information about our products or licensing, please contact us at the following email addresses:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

  • This email address is being protected from spambots. You need JavaScript enabled to view it.

Get in Touch

If you would like to purchase our products or services, but don’t know how to do it the right way, please feel free to contact us:

  • This email address is being protected from spambots. You need JavaScript enabled to view it.( any questions related to our products or services )
  • This email address is being protected from spambots. You need JavaScript enabled to view it.( questions related to licensing )