Recent

Author Topic: Cannot edit in dbgrid  (Read 395 times)

GordonFindlay

  • New member
  • *
  • Posts: 5
Cannot edit in dbgrid
« on: November 26, 2020, 04:31:14 am »
I have a dbgrid on  a form, with the data source set to a TSQLQuery. The database is MySQL 5.6

But I cannot edit the cells. I can double-click in the cell, and it LOOKS like editing is allowed - highlight part of the contents,. But typing has no effect.

The properties at this stage are the default - I recreated the grid and left all the properties alone. In particular, AutoEdit is true, as is the option dgEditing.

I looked at the example project 'dblookup' and the grids there seem to have been configured as I have my ine.

What stupid mistake am I making?

Sieben

  • Full Member
  • ***
  • Posts: 196
Re: Cannot edit in dbgrid
« Reply #1 on: November 26, 2020, 07:28:56 am »
Is your dataset or datasource readonly?
Lazarus 2.0.10, FPC 3.2.0, .deb install on Ubuntu Xenial 32 / Gtk2 / Unity7

GordonFindlay

  • New member
  • *
  • Posts: 5
Re: Cannot edit in dbgrid
« Reply #2 on: November 26, 2020, 09:43:07 am »
Neither is as far as I can see.

GordonFindlay

  • New member
  • *
  • Posts: 5
Re: Cannot edit in dbgrid
« Reply #3 on: November 26, 2020, 08:06:43 pm »
Still don't know what happened - but I restructured data components etc into a data module and all is well.

Probably some property got set incorrectly somewhere earlier on, and has been shaken loose.

Cheers

 

TinyPortal © 2005-2018