Autor Beitrag
ralph71
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54



BeitragVerfasst: Fr 09.12.16 11:35 
Hallo,
in einem datagridview möchte ich eine Zeit sehr schnell erfassen können.

Der Datentyp ist aktuell time(7)
Aktuell muss ich dafür schreiben: 8:30
Wesentlich schneller wäre: 0830 --> nach Verlassen der Zelle würde dann 8:30 stehen

Wichtig ist, dass der Datentyp weiß, dass er eine Zeit ist um Eingaben wie 0870 --> 8:70 zu verhindern
Ist das machbar?

Danke euch!

Moderiert von user profile iconTh69: Titel angepaßt (datagrid -> DataGridView), um Verwechslungen zu vermeiden.
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Fr 09.12.16 12:40 
Hallo,

2 Möglichkeiten fallen mir dazu en:
1. CellValidating, s. z.B. How formatting a data in a dataGridView
2. MaskedTextBox als DataGridViewColumn-Control, s. z.B. DataGridView Custom Column Sample
Ralf Jansen
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 4700
Erhaltene Danke: 991


VS2010 Pro, VS2012 Pro, VS2013 Pro, VS2015 Pro, Delphi 7 Pro
BeitragVerfasst: Fr 09.12.16 14:07 
Was ist time(7) :gruebel: Ein Datentyp ist es nicht, ein CellStyle Format eigentlich auch nicht. Was ist das?
Frühlingsrolle
Ehemaliges Mitglied
Erhaltene Danke: 1



BeitragVerfasst: Fr 09.12.16 19:06 
- Nachträglich durch die Entwickler-Ecke gelöscht -
ralph71 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 54



BeitragVerfasst: Do 22.12.16 13:38