Recent

Author Topic: DBGrid editing control  (Read 1110 times)

egsuh

  • Hero Member
  • *****
  • Posts: 1729
DBGrid editing control
« on: December 14, 2024, 04:00:33 am »
Is there any way to set DBGrid so that the content is set editible only when Dataset is set to  dsEdit mode via TDBNavigator, not directly by pressing F2 on the DBGrid?

dsiders

  • Hero Member
  • *****
  • Posts: 1509
Re: DBGrid editing control
« Reply #1 on: December 14, 2024, 05:45:36 am »
Is there any way to set DBGrid so that the content is set editible only when Dataset is set to  dsEdit mode via TDBNavigator, not directly by pressing F2 on the DBGrid?

You might be able to use OnSelectEditor and set its Editor argument to Nil if the Dataset state is not dsEdit.

silvercoder70

  • Full Member
  • ***
  • Posts: 200
    • Tim Coates
Re: DBGrid editing control
« Reply #2 on: December 14, 2024, 12:43:29 pm »
if you don't want to the user pressing F2... doesn't that make the app a little less friendly for users that prefer not to use a  mouse?

But ... if it were something permission related, then could you not try something with the dataset OnStateChange?

🔥 Pascal Isn’t Dead -> See What It Can Do: @silvercoder70 on YouTube

 

TinyPortal © 2005-2018