TdxDBGrid搜寻的问题 ( 积分: 50 )

  • 主题发起人 主题发起人 zyt_1978
  • 开始时间 开始时间
Z

zyt_1978

Unregistered / Unconfirmed
GUEST, unregistred user!
搜寻TdxDBGrid控件某列的值,可以用如下代码,但是新控件TcxDBGrid怎样替换下面的代码<br>&nbsp;&nbsp;//搜寻<br>&nbsp;&nbsp;with&nbsp;TFrminputstring.Create(Self)&nbsp;do<br>&nbsp;&nbsp;begin<br>&nbsp;&nbsp;&nbsp;&nbsp;labPrompt.Caption&nbsp;:=&nbsp;DBGrid1.FocusedField.DisplayLabel;<br>&nbsp;&nbsp;&nbsp;&nbsp;Caption&nbsp;:=&nbsp;'搜寻';<br>&nbsp;&nbsp;&nbsp;&nbsp;edtInput.Text:=DBGrid1.DataSource.DataSet.fieldbyname(DBGrid1.FocusedField.FieldName).asstring&nbsp;;<br>&nbsp;&nbsp;&nbsp;&nbsp;ShowModal;<br>&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;strResult&lt;&gt;''&nbsp;then<br>&nbsp;&nbsp;&nbsp;&nbsp;begin<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DBGrid1.StartSearch(-1,edtInput.Text);<br>&nbsp;&nbsp;&nbsp;&nbsp;end;<br>&nbsp;&nbsp;end;<br>&nbsp;&nbsp;DBGrid1.SetFocus;
 

Similar threads

后退
顶部