• GridEh排序


    添加pas文件

    EhLibADO.pas

    EhLibCDS.pas

    EhLibFireDAC.pas

    支持FireDAC

    设置GridEh的属性

        DBGridEh1->SortLocal = true;
        DBGridEh1->OptionsEh << dghAutoSortMarking;
        DBGridEh1->ColumnDefValues->Title->TitleButton = True;

      DBGridEh1.SortLocal := true;
      DBGridEh1.OptionsEh := DBGridEh1.OptionsEh + [dghAutoSortMarking];
      DBGridEh1.ColumnDefValues.Title.TitleButton := true;

    grideh改变单元格字体颜色

    void __fastcall TFrm ::DBGridEh2DrawColumnCell(TObject *Sender, const TRect &Rect,
        int DataCol, TColumnEh *Column, Gridseh::TGridDrawState State)
    {
    
        if (Column->FieldName == "性别" && Column->Field->Value == "009")
        {
            DBGridEh2->Canvas->Font->Color  = clRed;
            DBGridEh2->DefaultDrawColumnCell(Rect, DataCol, Column, State);
        }
    }

    单元格背景

    DBGridEh1.Canvas.Brush.Color := clGreen;
    整行颜色
    void __fastcall TFrm ::DBGridEh2DrawColumnCell(TObject *Sender, const TRect &Rect,
        int DataCol, TColumnEh *Column, Gridseh::TGridDrawState State)
    {
    
        if (DBGridEh2->DataSource->DataSet->FieldByName("sex")->Value == "009")
        {
            DBGridEh2->Canvas->Brush->Color  = clRed;
            DBGridEh2->DefaultDrawColumnCell(Rect, DataCol, Column, State);
        }
    }
  • 相关阅读:
    Samba网络配置
    嵌入式汇编程序
    GDB常用命令
    Everything搜索结果显示0 Object
    关于值类型和引用类型
    Main()

    利用python脚本自动下载ICML会议接受的文章
    如何从mac下的photos导出照片
    Erlang语言研究综述
  • 原文地址:https://www.cnblogs.com/cb168/p/4294007.html
Copyright © 2020-2023  润新知