taha_gh Posted May 15, 2014 Share Posted May 15, 2014 hi all can i change the key for edit in unidbgrid (by default enter) to for exemple F2 or other Link to comment Share on other sites More sharing options...
Sherzod Posted May 16, 2014 Share Posted May 16, 2014 Hi Taha Try: This code not cancels pressing Enter Simply adds the F2 key to enter the cell procedure TMainForm.UniDBGrid1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState); var gridJSName: string; begin if Key = VK_F2 then begin gridJSName := (Sender as TUniDBGrid).JSName; UniSession.AddJS(gridJSName + '.editingPlugin.startEditByPosition({row: ' + gridJSName + '.uniRow, column: ' + gridJSName + '.uniCol})'); end; end; Best regards. Link to comment Share on other sites More sharing options...
Sherzod Posted May 16, 2014 Share Posted May 16, 2014 This code cancels pressing Enter, but it is not the best way ...: UniDBGrid1 -> ClientEvents -> ExtEvents -> add and replace function keydown: function keydown(e) { if (e.keyCode == 13 && this.editingPlugin) { this.editingPlugin.completeEdit(); } } Link to comment Share on other sites More sharing options...
mehmet07 Posted May 16, 2014 Share Posted May 16, 2014 how unidbgrid navigate column with enter key? Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now