emulate a cell click lazarus / 16-Databases ---------------------------------------------------------------------- mtdew3q · 2005-08-10 13:10 Hi- ver .98 win tdbf for this property i got some code off the internet for use with delphi. property SelectedIndex: Integer; [rw] procedure TForm1.Button1Click(Sender: TObject);    Var   Column:TColumn; begin dbGridIncome.SelectedIndex:=1; dbGridIncome.SetFocus; dbGridIncome.OnCellClick(Column) end; this property seems to be public and a descendant of tdbgrid so it should be available right...unless i am not setting it correctly (probably the case) i'd kind of like to get a programmable cell click working because on arrival at the grid i'd like to have col 0 ready to edit without clicking. i just learned tonight that it is better to use the reference in the wiki then figure out what is and isnt available on code complete for now. this isnt a huge deal but if you know right off i'd apreciate the tip. thanks, jim ---------------------------------------------------------------------- jesusr · 2005-08-10 17:40 SelectedIndex was implemented a week ago, you will need a recent Lazarus version. I just made stringgrid and dbgrid property EditorMode public so you could do something like: Code: [Select] procedure TForm1.Button1Click(Sender: TObject); begin   dbGridIncome.SelectedIndex:=1;   dbGridIncome.EditorMode := true; end; That should have the effect of clicking the second field in the current selected record to start editing. ---------------------------------------------------------------------- Anonymous · 2005-08-10 19:16 thanks jesusr, that code snippet will come in handy when i upgrade my version. i am having lots of fun with lazarus.  it is really impressive. later, jim