在一COMBOBOX中存放了一表中的所有编号,该COMBOBOX不能与数据源关联
当COMBOBOX中的值发生了改变,我想要DBGRID中的小三角定位到该编号的
记录处。请各位大虾指点,急呀
谢谢!!

解决方案 »

  1.   

    根據編號locate那條紀錄即可。
      

  2.   

    Tabel1.fields[编号].asstring:=combobox的选中植
    数值转换自己来了!
      

  3.   

    var
        s:string;
        i:integer;
    i:=combobox1.ItemIndex;
    tabel1.setkey;
    Tabel1.fields[编号].asstring:=combobox1.Items[i];
    tabel1.gotokey;
      

  4.   

    用TABLE的LOCATE来定位
    Table.Locate(fieldname,fieldValue,[])
      

  5.   

    为什么不用DBLookupComboBox?
    DataSource和DataField设为空,指定ListSource和ListField就行
      

  6.   

    用TABLE的LOCATE来定位
    Table.Locate(fieldname,fieldValue,[])
      

  7.   

    在Combobox的change事件写
    if Combobox.items[Combobox.itemindex] <>'' then
    begin
      with DBGrid1.DataSource.Dataset do
          locate('fieldno','Combobox.items[Combobox.itemindex]',[loPartialKe]);
    end;