Autor Beitrag
csigg
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Do 21.07.05 11:34 
Ich hab ein DBGrid das normal auf folgende optionen eingestellt ist:
ausblenden Quelltext
1:
[dgTitles,dgColumnResize,dgRowLines,dgTabs,dgRowSelect,dgConfirmDelete,dgMultiSelect]					

wenn man die Taste E (wie edit *g*) drückt, dann werden die Options auf
ausblenden Quelltext
1:
dbgAnwesend.Options := [dgEditing,dgTitles,dgRowLines];					

gesetzt. Mit der taste RETURN werden sie wieder in den Ursprünglichen Zustand gesetzt.
Allerdings tritt manchmal ne Exception auf:
ausblenden Quelltext
1:
Datenmenge weder im Editier noch im Einfügemodus					

Wie kann ich dies beheben??
Semi
Hält's aus hier
Beiträge: 11



BeitragVerfasst: Do 21.07.05 13:47 
TTable oder TQuery oder TDataSet nicht im Editier Modus
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Do 21.07.05 13:48 
Funktioniert aber zu 90%, nur manchmal macht er es nicht. Bin noch nicht genau dahinter gekommen wann.



hab grad rausgefunden, wenn es markiert ist, und ich nix bearbeite und dann wieder Enter-drücke, dann gibts die Exception
Matthias-K
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 271

Win95, Win98, Win2000, WinXP, Linux
D2, D4 Client/Server, D5 Enterprise, D6 Enterprise, D7 Enterprise, Delphi2005, C/C++ 3.0, C/C ++ 5.0, C/C++ 6.0
BeitragVerfasst: Do 21.07.05 17:57 
dann frage beim return nach, ob sich die datenmenge noch im edit mode befindet!

mfg matthias
csigg Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 706

WIn XP, Win NT, Win2000, Suse8.0
Delphi 5, Delphi 6
BeitragVerfasst: Fr 22.07.05 08:21 
hab ich schon drin, birngt aber auch nicht unbedingt was
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
  if dbgAnwesend.EditorMode then
     begin
       dmMesse.TDAnwesend.Post;
     end;
   dbgAnwesend.Options :=  [dgTitles,dgColumnResize,dgRowLines,dgTabs,dgRowSelect,dgMultiSelect];

    for i:=0 to frm_Verwalt.ComponentCount-1 do
          begin
               if frm_Verwalt.Components[i] is TControl then
               (frm_Verwalt.Components[i] as TControl).Enabled:=true;
          end;