Page 1 of 1
[i18n] TDBINtDatePicker auto puts DataSet in dsEdit state

Posted:
October 17th, 2012, 8:10 pm
by JHarding
Hi,
If my form contains a TDBINtDatePicker hooked to a datasource and field the DataSet state is automatically changed to dsEdit from dsBrowse. Is this a bug or am I missing something.
Thanks
Re: [i18n] TDBINtDatePicker auto puts DataSet in dsEdit stat

Posted:
October 17th, 2012, 8:22 pm
by JHarding
Some additional info. In my code I assign the DataSource.DataSet in the OnShow event. With the TDBINtDatePicker this calls the DataChange event which calls SetDate and Change which calls DataLink.Edit. This should not be done when no data change was made.
Thanks
Re: [i18n] TDBINtDatePicker auto puts DataSet in dsEdit stat

Posted:
October 18th, 2012, 6:02 pm
by Kambiz
Is TDBINtDatePicker a custom control? If yes, how can I have it to test the case.
Which version of Delphi are you using?
Re: [i18n] TDBINtDatePicker auto puts DataSet in dsEdit stat

Posted:
October 18th, 2012, 6:13 pm
by JHarding
Sorry I missed the l in TDBIntlDatePicker. It's part of the i18n components nothing custom.
Re: [i18n] TDBINtDatePicker auto puts DataSet in dsEdit stat

Posted:
October 23rd, 2012, 4:54 pm
by Kambiz
Hi,
Sorry, last weekend I couldn't find a free time to work on this issue. I hope the next weekend thing goes better.
Re: [i18n] TDBINtDatePicker auto puts DataSet in dsEdit stat

Posted:
October 28th, 2012, 7:12 pm
by Kambiz
To fix the problem, please replace
TCustomDBIntlDatePicker.Change procedure in
i18nDBDateCtrls.pas file with the following code.
- Code: Select all
procedure TCustomDBIntlDatePicker.Change;
begin
if not fChanging and DataLink.Edit then
begin
inherited Change;
DataLink.Modified;
end;
end;
Thanks for reporting the problem.