Ticket DS12673
Visible to All Users

Highlight column header for focused column

created 19 years ago

I suggest you to create a grid properties that change the color or font or color font to the header column that is currently selected.
This can be resolved with this code:
procedure TForm1.cxGrid1DBTableView1StylesGetHeaderStyle(
  Sender: TcxGridTableView; AColumn: TcxGridColumn; out AStyle: TcxStyle);
begin
  if (AColumn <> nil) and (Sender.Controller.FocusedColumnIndex = AColumn.Index) then
    AStyle := cxFocusedHeaderStyle;
end;
procedure TForm1.cxGrid1DBTableView1FocusedItemChanged(
  Sender: TcxCustomGridTableView; APrevFocusedItem,
  AFocusedItem: TcxCustomGridTableItem);
begin
  Sender.LayoutChanged();
end;
The problem is that my project have 80 forms and I have to change every form in my project.
Thank's
Ionut Oprea

Comments (3)
Serge (DevExpress Support) 19 years ago

    Thank you for the suggestion. We appreciate it and will consider it regarding future versions of the ExpressQuantumGrid. Sorry, I cannot give you any promises at present because you are actually the first person asking for this functionality.
    For now, I recommend that you implement a custom View to get rid of writing code for for all your Grids. Please review the following Knowledge Base article that may be helpful:
     "How to Utilize the QuantumGrid's Flexibility to Implement a New Feature in a Derived Class"
     Article ID: A334 (http://www.devexpress.com/kbA334)
    Thanks,
    Serge

    DevExpress Support Team 14 years ago

      Hello Ionut.
      As we stated before, you can create a custom GridView and override its ColumnHeader painting routines.
      Attached is a sample project that demonstrates how to create a custom View and declare a new property to control the focused column's header color.
      Hopefully, it will help you achieve the required functionality.
      Best regards,
      Ingvar.

        It's ok now.

        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.