Recent

Poll

How to change Date entry in RxDBGrid for edit Date directly

Become a better RXDGrid
0 (0%)
Now Input with Edit for Date in RxDBGrid
0 (0%)

Total Members Voted: 0

Author Topic: Date entry with RxDBGrid  (Read 533 times)

MaxLemberger

  • Newbie
  • Posts: 1
Date entry with RxDBGrid
« on: March 02, 2020, 05:59:19 am »
It is not possible to enter the date directly in the RxDBGrid if the date field is empty. There must first be a date so that you can enter a date with the keyboard. I have rewritten the procedure TRxDBGridDateEditor.EditChange in rxdbrid.pas (from line 2704) so that the date can also be entered directly on the keyboard.

The limitation of the year "if not ((iye> 1899) and (iye <2200)) then b: = false;" can be omitted or transferred to properties.

I have not yet checked whether the procedure may need to be adapted to other system settings. It could then be that a different pattern is used instead of "dd.mm.yyyy" However, this can easily be adjusted.

I have attached a new File which takes into account the system settings for ShortDate Format.:"TRxDBGridDateEditorEditChangeSystemDate.txt" .

Since I have not found any contact details for the developer / translator, I post the procedure here. It may be helpful for some.
« Last Edit: March 02, 2020, 09:08:10 am by MaxLemberger »

zoltanleo

  • Sr. Member
  • ****
  • Posts: 283
Re: Date entry with RxDBGrid
« Reply #1 on: March 02, 2020, 09:09:54 am »
Hi, MaxLemberger
I passed your patch to RxLib developer Alex Logunov. Original post on Russian freepascal forum here:

http://www.freepascal.ru/forum/viewtopic.php?f=18&t=7948&p=158627#p158627

Unfortunately, the developer does not speak English well. But you can use a translator  ;)
Win10 LTSC x64/Deb 10 amd64/Darwin Cocoa:
Lazarus x32/x64 2.1(r.64129); FPC 3.3.1 (r.47400), FireBird 3.0.7

Sorry for my bad English, I'm using translator ;)

alexs75

  • Full Member
  • ***
  • Posts: 106
Re: Date entry with RxDBGrid
« Reply #2 on: March 02, 2020, 09:53:28 am »
Hey. What is the problem of entering data on an empty dataset? can I have an example?

I'm make simple test with RxDBGrid and RxMemDataset - work normal.

 

TinyPortal © 2005-2018