Ticket S413
Visible to All Users

UltraFlat look-and-feel - Make it possible to remove thick (doubled) lines between bands and column headers

created 19 years ago

See the attached screenshot. Is it possible not to show these thick lines and draw them as regular grid lines?

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

    For now, this can be done by using the custom draw abilities of the ExpressQuantumGrid. More precisely, it is necessary to handle the OnCustomDrawColumnHeader and OnCustomDrawBandHeader events of a Banded View and hide some borders of bands and columns.
    The attached project demonstrates how to implement this functionality. Hopefully, it will be helpful and it will not be a problem to adapt it.

    DevExpress Support Team 14 years ago

      You can achieve the desired appearance using GridView's OnCustomDrawColumnHeader and OnCustomDrawBandHeader events as follows:

      Delphi
      procedure <aForm>.<aBandedView>CustomDrawColumnHeader( Sender: TcxGridTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridColumnHeaderViewInfo; var ADone: Boolean); begin with TcxGridDBBandedColumn(AViewInfo.Column).Position do begin if not AViewInfo.IsPressed then if (VisibleColIndex = 0) and (Band.VisibleIndex <> 0) then AViewInfo.Borders := AViewInfo.Borders - [bLeft] else else AViewInfo.Borders := [bLeft .. bBottom]; end; end; procedure <aForm>.<aBandedView>CustomDrawBandHeader( Sender: TcxGridBandedTableView; ACanvas: TcxCanvas; AViewInfo: TcxGridBandHeaderViewInfo; var ADone: Boolean); begin if not AViewInfo.IsPressed then begin AViewInfo.Borders := AViewInfo.Borders - [bBottom]; if AViewInfo.Band.VisibleIndex > 0 then AViewInfo.Borders := AViewInfo.Borders - [bLeft]; end else AViewInfo.Borders := [bLeft .. bBottom]; end;

      Please refer to the sample project from our previous post that shows this approach in action.

      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.