Flexible adjustment of a lookup inplace editor

没有输入拼音码搜索功能。

Drop-Down Forms

这个比较符合中国人的习惯,搜索框,不错,点下来箭头才能弹出,能不能输入字母进入搜索。

EhLib allows to create Drop-down Forms that can be shown on pressing of edit button in the text editors.

GridEh的列有这个事件

curGrid->Columns->Items[]->DropDownFormParams->DropDownForm;

__property TCustomForm* DropDownForm ;
__property UnicodeString DropDownFormClassName ;
__property TDropDownAlign Align ;
__property TDropDownPassParamsEh PassParams ;
__property UnicodeString PassFieldNames ;
__property UnicodeString AssignBackFieldNames ;
__property int FormWidth ;
__property int FormHeight ;
__property bool SaveFormSize ; void __fastcall TFrm::DBGridEh1Columns0OpenDropDownForm(TCustomDBGridEh *Grid, TColumnEh *Column, TEditButtonEh *Button, TCustomForm *&DropDownForm, TDynVarsEh *DynParams)

TDBLookupComboboxEh

Search panel

DBGridEh can display a special panel to search and filter the data in the grid.

curGrid->SearchPanel->FilterOnTyping,以下属性,很好用。

__property bool Enabled ;
__property bool PersistentShowing ;
__property TShortCut ShortCut;
__property TSearchPanelLocationEh;
__property bool FilterOnTyping;//输入字母实时过滤
__property bool FilterEnabled;

Data grouping

Grid allows to group data using columns as a criterion of grouping.

It is allowed to display a grid summarizing the records for each group, and the overall record summarizing the bottom of the grid.

需要用到MemTableEh1,DataSetDriverEh1,用普通的adoquery和fdmemtable,clientdataset不能显示。用memtableeh就可以分组了。

DBGridEh2->DataGrouping

    __property bool Active  ;
__property TGridDataGroupLevelsEh* GroupLevels ;
__property TGridDataGroupFootersEh* Footers ;
__property TGridDataGroupFootersDefValuesEh* FootersDefValues ;
__property bool GroupPanelVisible ;
__property bool DefaultStateExpanded ;
__property TGridDataGroupRowDefValuesEh* GroupRowDefValues ;
__property bool ShiftFolldataGroupRow ;

From http://ymg97526.blog.163.com/blog/static/173658160201122695449603/

procedure TForm1.FormCreate(Sender: TObject);

var i:Integer;

begin

//DBGridEh1.Flat:=True;

DBGridEh1.ColumnDefValues.Title.Alignment:=taCenter;

DBGridEh1.DataSource:=DataSource1;

DataSource1.DataSet:=MemTableEh1;

MemTableEh1.DataDriver:=DataSetDriverEh1;

MemTableEh1.CachedUpdates:=True;

MemTableEh1.FetchAllOnOpen:=True; //打开获取所有记录

DataSetDriverEh1.ProviderDataSet:=ADOQuery1;

ADOQuery1.ConnectionString:='Provider=Microsoft.Jet.OLEDB.4.0;'+

          'Data Source=f:\mcmygs.mdb;'+

          'Persist Security Info=False;'+

          'Jet OLEDB:Database Password=123456';

ADOQuery1.Close;

ADOQuery1.SQL.Text:='Select cyear,cmonth,fphm,bhsje,se,jshj from zyfp';

ADOQuery1.Open;

MemTableEh1.Active:=True;

DBGridEh1.DataGrouping.Active:=True;

//DBGridEh1.DataGrouping.DefaultStateExpanded:=True; //默认为展开状态

DBGridEh1.DataGrouping.GroupPanelVisible:=True;

DBGridEh1.DataGrouping.GroupLevels.Add.Column:=DBGridEh1.Columns[];

DBGridEh1.DataGrouping.GroupLevels.Add.Column:=DBGridEh1.Columns[];

//DBGridEh1.Columns[0].Visible:=False;

//DBGridEh1.Columns[1].Visible:=False;

DBGridEh1.DataGrouping.Font.Style:=[fsBold];

//DBGridEh1.DataGrouping.Color:=clSkyBlue;

DBGridEh1.TitleFont.Color:=clBlue;

DBGridEh1.GridLineColors.DarkColor:=clRed;

//DBGridEh1.GridLineColors.BrightColor:=clBlack;

DBGridEh1.ColumnDefValues.Title.Alignment:=taCenter;

for i:= to MemTableEh1.Fields.Count- do

  begin

    if MemTableEh1.Fields[i].DataType=ftFloat then

       DBGridEh1.Columns[i].DisplayFormat:='#,###,###.00';

  end;

end;

DropDown filter list

Grid allows to filter data using a droped down list box where users can select items for filtering using checkboxes.

DBGridEh2->STFilter->Visible;

还是要用MemTableEh1才起作用。

    __property bool InstantApply  ;
__property bool Local ;
__property TSTFilterLocationEh Location ;
__property bool Visible ;
__property TColor HorzLineColor ;
__property int RowHeight ;
__property int RowLines ;
__property TColor VertLineColor ;
__property TDBGridFilterButtonDrawTimeEh FilterButtonDrawTime ;

ObjectInspector Form

Global function to display a ObjectInspector-like Form.
This is a simple ObjectInspector that can be used to debug
property setting at run-time。

TObjectInspectorEh

添加Common\ObjectInspectorEh.pas文件,写2行代码就OK,我只能说太方便了。

TRect rect(, , , );
ShowObjectInspectorForm(curGrid, rect, false);

GridEh Lookup的更多相关文章

  1. SQL Server-聚焦移除Bookmark Lookup、RID Lookup、Key Lookup提高SQL查询性能(六)

    前言 前面几节都是讲的基础内容,本节我们讲讲索引性能优化,当对大数据进行处理时首先想到的就是索引,一旦遇到这样的问题则手忙脚乱,各种查资料,为何平常不扎实基本功呢,我们由浅入深,简短的内容,深入的理解 ...

  2. Salesforce的sharing Rule 不支持Lookup型字段解决方案

    Salesforce 中 sharing rule 并不支持Look up 字段 和 formula 字段.但在实际项目中,有时会需要在sharing rule中直接取Look up型字段的值,解决方 ...

  3. eclipse调试(debug)的时候,出现Source not found,Edit Source Lookup Path,一闪而过

    问题描述 使用Eclipse调试代码的时候,打了断点,经常出现Source not found,网上找了半天,大部分提示点击Edit Source Lookup Path,添加被调试的工程,然而往往没 ...

  4. mongodb 3.x 之实用新功能窥看[2] ——使用$lookup做多表关联处理

    这篇我们来看mongodb另一个非常有意思的东西,那就是$lookup,我们知道mongodb是一个文档型的数据库,而且它也是最像关系型数据库的 一种nosql,但是呢,既然mongodb是无模式的, ...

  5. Lookup component 用法

    Lookup component 类似于Tsql的join子句, select a.* ,b.* from dbo.tis a left join dbo. tdes b on a.code=b.co ...

  6. [SharePoint]javascript client object model 获取lookup 类型的field的值,包括user类型(单人或者多人)的值。how to get the multiple user type/lookup type field value by Javascript client object model

    1. how to get value var context = new SP.ClientContext.get_current(); var web = context.get_web(); v ...

  7. [SharePoint 2010] Modify lookup mapping with PowerShell

    SharePoint支持将列表保存成列表模板,但当列表包含Lookup字段时,通过模板创建的列表会丢失Lookup字段的信息. 通过PowerShell,可以修改Lookup字段的xml内容. Fun ...

  8. Informatica Lookup Transformation组件的Connect 与Unconnected类型用法

    Informatica Lookup Transformation组件的Connect 与Unconnected类型用法及区别:下面是通一个Lookup在不同Mapping中的使用: 1. Conne ...

  9. AX 2012 两种lookup 的显示方式

    第一种:只能单选的lookup: 代码: public void BusinessUnitLookup(FormStringControl _formstrcontroll) { //OMOperat ...

随机推荐

  1. UVALive-3487 Duopoly(最小割)

    题目大意:有两家公司都想向政府申请某些资源的使用权,并且他们都提供了一些申请列表,列表中含有申请费用和资源种类,同一家公司的申请列表之间不含有重复的资源.政府只可以完整地接受和拒绝谋一份申请列表,问政 ...

  2. 带你走进脚本世界,ijkplayer之【init-ios.sh】脚本分析

    前言 集成ijkplayer,需要执行脚本init-ios.sh,那么init-ios.sh脚本干嘛用的了,花了半天时间,学习了下shell脚本,感觉脚本语言学起来还是比较容易上手的,现在仅仅能看懂了 ...

  3. bzoj1176

    题解: 和上一题差不多 就加上一个初始值 代码: #include<bits/stdc++.h> ; using namespace std; int n,m,cnt,s,sum[N],a ...

  4. Struts2基本使用(三)--数据交互

    Struts2中的数据交互 在Struts2中我们不必再使用request.getParameter()这种方式来获取前台发送到服务器的参数. 我们可以在服务器端的Java类中直接声明一个和前台发送数 ...

  5. EM算法及其应用: K-means 与 高斯混合模型

    EM算法及其应用(一) EM算法及其应用(二): K-means 与 高斯混合模型 上一篇阐述了EM算法的主要原理,这一篇来看其两大应用 -- K-means 与 高斯混合模型,主要由EM算法的观点出 ...

  6. win7下解压安装mysql的方法

    在win7下通过解压安装mysql 5.7一直出现启动不成功,网上找了好久终于找到一个解决方法,记录一下: 1.解压下载的压缩包 2.在解压目录下,将my-default.ini改名为my.ini, ...

  7. 实现C++标准库string类的简单版本

    代码如下: #ifndef STRING_H #define STRING_H #include <cassert> #include <utility> #include & ...

  8. checkbox不显示,试试去掉-webkit-appearance这个样式

    目前在项目中发现一个大坑,搞的我找了好久不知道因为什么,自用的reset.css中加入了 -webkit-appearance: none;其他所有表单没有出现问题,但checkbox会不显示,值改为 ...

  9. C# 调用C++ DLL 的类型转换(转载版)

    最近在做视频监控相关的demo开发,实现语言是C#,但视频监控的SDK是C++开发的,所以涉及到C#调用C++的dll库.很多结构体.参数在使用时都要先进行转换,由非托管类型转换成托管类型后才能使用. ...

  10. linux screen 命令详解(转载)

    转载于:http://www.cnblogs.com/mchina/archive/2013/01/30/2880680.html 一.背景 系统管理员经常需要SSH 或者telent 远程登录到Li ...