Recent

Author Topic: dataset is not in insert or edit mode | DBgrid  (Read 3176 times)

cpalx

  • Hero Member
  • *****
  • Posts: 753
dataset is not in insert or edit mode | DBgrid
« on: November 03, 2018, 12:00:48 am »
Hello,

i have a dbgrid, bufdataset and Dataset,
i insert (append) elements to the bufdatset and display in the dbgrid. All Ok, but when i make a click or doble click to the DBgrid show a error: "dataset is not in insert or edit mode". And it is obviosly, but how can i solve that problem?

Lazarus 1.8.4
FPC 3.04
Windows 7/10

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: dataset is not in insert or edit mode | DBgrid
« Reply #1 on: November 03, 2018, 12:32:48 am »
Have you set AutoEdit to True for the DBGrid?
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: dataset is not in insert or edit mode | DBgrid
« Reply #2 on: November 03, 2018, 12:39:22 am »
Autoedit is in False

lucamar

  • Hero Member
  • *****
  • Posts: 4219
Re: dataset is not in insert or edit mode | DBgrid
« Reply #3 on: November 03, 2018, 12:50:57 am »
Well, try setting it to True :)

It's not the only (neither, probably, the best) solution, but it's the easiest.
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.12/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

cpalx

  • Hero Member
  • *****
  • Posts: 753
Re: dataset is not in insert or edit mode | DBgrid
« Reply #4 on: November 03, 2018, 09:47:15 pm »
works... thanks

 

TinyPortal © 2005-2018