delphidelphi-2009devexpressvcltcxgrid

Showing cell content on hint in DevExpress grid


I am using TcxGridDBTableView from DevExpress. Some of the cells contain really long strings, so I want to be able to show them to users using Hints. I want also to be able to do have line brakes in hint in places of semicolon in my text.

Do you know how to simply achieve this?


Solution

  • Try this

    procedure TForm1.cxGrid1TableView1Column3GetCellHint(
      Sender: TcxCustomGridTableItem; ARecord: TcxCustomGridRecord;
      ACellViewInfo: TcxGridTableDataCellViewInfo; const AMousePos: TPoint;
      var AHintText: TCaption; var AIsHintMultiLine: Boolean;
      var AHintTextRect: TRect);
    begin
      AHintText := VarToStr(ARecord.Values[Sender.Index]);
      AIsHintMultiLine := True;
    end;
    

    http://www.devexpress.com/Support/Center/p/B133087.aspx