查了网上很多资料,懒人输入:通过程序使用过滤对话达到自己的目的:
用到cxFilter单元;
cbb_DoctorOrder.Properties.View.DataController.Filter.Clear; cbb_DoctorOrder.Properties.View.DataController.Filter.Root.Clear; cbb_DoctorOrder.Properties.View.DataController.Filter.Root.AddItem(cxgrdbclmncxgrdbtblvwcxgrd1DBTableView1SF_NAME,foLike,'%'+cbb_DoctorOrder.EditText+'%','%'+cbb_DoctorOrder.EditText+'%'); cbb_DoctorOrder.Properties.View.DataController.Filter.Root.BoolOperatorKind := fboOR; cbb_DoctorOrder.Properties.View.DataController.Filter.Root.AddItem(cxgrdbclmncxgrdbtblvwcxgrd1DBTableView1SF_HELP,foLike,'%'+cbb_DoctorOrder.EditText+'%','%'+cbb_DoctorOrder.EditText+'%'); cbb_DoctorOrder.Properties.View.DataController.Filter.Active := True
详细请参考牛人http://blog.csdn.net/zengcong2013/article/details/12346535