Autor Beitrag
stefanstp
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Mi 09.10.02 14:04 
Ich habe ein Stringgrid, wo sich in der 2. Spalte das Feld Datum befindet.

Jetzt möchte ich, das ich relativ schnell ein Datum dort eingetragen bekomme. Deswegen habe ich ein Kalender eingeblendet. Jetzt möchte ich, wenn man auf dieses MonthCalender doppelt klickt, das Datum genau in der selektierten Zelle eingetragen wird.

Wie es geht, wenn ich es in einem Edit1 Feld haben möchte, weiss ich:

Edit1.Text := Datetostr( MonthCalendar1.Date);


aber wie geht das für das StringGrid und genau in der Zelle ich die markiert habe (nicht im Edit-Modus, nur mit der Maus einmal angeklickt)?

Würde mich freuen wenn mir einer helfen kann!

Danke STEFAN
LCS
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 1305
Erhaltene Danke: 1

WIN 7, WIN 8
Delphi XE5, Delphi XE, Delphi 2007
BeitragVerfasst: Mi 09.10.02 14:26 
Hi
Funktioniert fast genauso einfach
ausblenden Quelltext
1:
StringGrid1.Cells[StringGrid1.Col, StringGrid1.Row] := Datetostr( MonthCalendar1.Date);					


Gruss Lothar

_________________
Der BH ist für die Brust, der Plan ist für'n Ar...
stefanstp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Mi 09.10.02 14:28 
Titel: Danke...werde ich gleich mal ausprobieren!
....Hoffentlich geht es.

STEFAN
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 09.10.02 14:29 
Hi!

ausblenden Quelltext
1:
  StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]:=Datetostr( MonthCalendar1.Date);					


Wenn ich Dich richtig verstanden habe, sollte es so funktionieren!

MfG,
Peter

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
Christian S.
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 20451
Erhaltene Danke: 2264

Win 10
C# (VS 2019)
BeitragVerfasst: Mi 09.10.02 14:30 
Da war ja einer schneller ...

_________________
Zwei Worte werden Dir im Leben viele Türen öffnen - "ziehen" und "drücken".
stefanstp Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 106



BeitragVerfasst: Do 10.10.02 12:10 
Titel: Wollte nur sagen, das der Code super funktioniert hat. DANKE
ausblenden Quelltext
1:
StringGrid1.Cells[StringGrid1.Col,StringGrid1.Row]:=Datetostr( MonthCalendar1.Date);					


Funktioniert super!

Danke STEFAN