1 2 3 4 5 6 |
procedure selectindexbyfield(grid_:TDBGrid;field_:string); var fn:integer; begin for fn:=0 to grid_.FieldCount-1 do if lowercase(grid_.Fields[fn].FieldName)=lowercase(field_) then break; grid_.SelectedIndex:=fn; end; |
1 2 3 4 5 6 |
procedure selectindexbyfield(grid_:TDBGrid;field_:string); var fn:integer; begin for fn:=0 to grid_.FieldCount-1 do if lowercase(grid_.Fields[fn].FieldName)=lowercase(field_) then break; grid_.SelectedIndex:=fn; end; |