Fateh Bouchair Posted June 15, 2023 Share Posted June 15, 2023 Hello The current behavior of the Unidbgrid is use TAP to navigate between columns, I want navigate with ENTER and and focus a columns on edit mode, depending the value of other column. Do you have any idea?? Thanks. Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 17, 2023 Share Posted June 17, 2023 procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = 13 then Begin UniDBGrid1.CurrCol := UniDBGrid1.CurrCol + 1; if UniDBGrid1.CurrCol = UniDBGrid1.Columns.Count then Begin UniDBGrid1.DataSource.DataSet.Next; UniDBGrid1.CurrCol := 0; End; End; end; Quote Link to comment Share on other sites More sharing options...
Fateh Bouchair Posted June 17, 2023 Author Share Posted June 17, 2023 9 hours ago, Luciano França said: procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); begin if Key = 13 then Begin UniDBGrid1.CurrCol := UniDBGrid1.CurrCol + 1; if UniDBGrid1.CurrCol = UniDBGrid1.Columns.Count then Begin UniDBGrid1.DataSource.DataSet.Next; UniDBGrid1.CurrCol := 0; End; End; end; I need to check if value of 1st col is 'X' then goto col2 else col3 if I change the value of the 1st col if I do check from dataset 1col show always old value Quote Link to comment Share on other sites More sharing options...
Luciano França Posted June 18, 2023 Share Posted June 18, 2023 2 hours ago, Fateh Bouchair said: I need to check if value of 1st col is 'X' then goto col2 else col3 if I change the value of the 1st col if I do check from dataset 1col show always old value I didn't understand. However, I already gave you the path, now you must adapt this code to your needs. What you need to do is also possible with a dbgrid VCL that doesn't depend on JavaScript. From a Google search it should find better solutions using VCL that will be possible to use with unidbgrid Quote Link to comment Share on other sites More sharing options...
Fateh Bouchair Posted June 19, 2023 Author Share Posted June 19, 2023 Thanks Luciano França Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.