RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
tomsoft
Posts: 6
Joined: Fri 29 Jan 2010 16:25

RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by tomsoft » Wed 21 Sep 2016 19:32

I'm using RAD STUDIO 10.1 BERLIN ENT Update 1 (Delphi), windows 10 Ent 64bits, Unidac ver 6.4.14 Pro without sources and I have the following problems:
1. In new project if I put a CRDBGrid in a form, an error (Argument out of range) shows.
2. When I open existing projects using this component errors shows and the CRDBGrid disappears.

I'd be thankful if this problem is resolved, because I have projects in development using CRDBGrid.
Grigore TOMOIAGA
TOMSOFT

azyk
Devart Team
Posts: 1119
Joined: Fri 11 Apr 2014 11:47
Location: Alpha Centauri A

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by azyk » Thu 22 Sep 2016 10:46

Thank you for the information, we have reproduced the described issue with the TCRDBGrid component and the new studio version.

Currently, we are testing DAC products for compatibility with RAD Studio Berlin 10.1 Update 1 and fixing detected issues.

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ertank » Tue 27 Sep 2016 22:26

I am glad that it is not just me having this problem.

Just deleted my post which seems to be a duplicate. Watching this thread instead.

rickyarzu
Posts: 3
Joined: Tue 27 Sep 2016 13:34

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by rickyarzu » Thu 29 Sep 2016 09:02

I finally found the nested bug it was the CanEditShow function inside TCRDBGrid Class.

it called the inherited CanEditShow even if columns.count equalled 0 raising the range error. I corrected adding a check on columns.count and this allows the grid to show correctly both at design time and at runtime

if (Columns.Count = 0) then // added
Result := False // added
else if (Columns.Count > 0) and Assigned(SelectedField) and (SelectedField is TMemoField) then
Result := False
else
Result := inherited CanEditShow;

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ertank » Thu 29 Sep 2016 10:17

And, how do you remove and install Grid control?

I have applied your patch.
Build crcontrols240.bpl
Uninstalled dclcrcontrols240.bpl
build dclcrcontrols240.bpl
install dclcrcontrols240.bpl

Opened a new VCL application and got exact same error.

rickyarzu
Posts: 3
Joined: Tue 27 Sep 2016 13:34

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by rickyarzu » Sat 01 Oct 2016 07:21

I had two versions of DAC controls installed ODAC AND PgDac. To make my patch i had to manually search all dcp and bpl but also dcu that were not uninstalled automatically. I noticed (in my case) that there was a copy of design time bpl and dcp other than mine. So I 'cleaned' all my buildings (both runtime and design time bpl) then searched and deleted bpl bpi dcu hpp and dcp files manually. Then rebuild it and solved. Note: trying to create the grid at runtime was Ok, compiling and running ready made forms also but my hell was when i was trying to open at design time a form containing the component or trying to put a new one on a form.

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ertank » Sat 01 Oct 2016 14:18

Thanks for the feedback.

I seem to have two copies of dcu file in my system. I *replaced* old one. Now, current projects can be used at run-time. No joy for design-time though. I still get already mentioned error if I am to drop a new TCRDBGrid on my new project empty form.

Seems, we need to wait for a proper solution.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ViktorV » Wed 05 Oct 2016 15:07

We have already fixed this issue. This fix will be included in the next build of DAC products.
All registered users of DAC products have source code of TCRGrid located in DAC_Install_Dir\Source\, where DAC_Install_Dir is a directory where you installed DAC product.
To solve the issue, you can perform the following steps:
- open the CRGrid.pas file and replace implementation of the TCRDBGrid.CanEditShow method in it with the following:

Code: Select all

function TCRDBGrid.CanEditShow: boolean;
begin
  if (Columns.Count = 0) or (Assigned(SelectedField) and (SelectedField is TMemoField)) then
    Result := False
  else
    Result := inherited CanEditShow;
end;
- save changes;
- open IDE and delete Devart Controls package from [Components]->[Install Packages] ;
- recompile the following packages: crcontrolsXX.dpk, dclcrcontrolsXX.dpk;
- install dclcrcontrolsXX.dpk;
- restart the IDE.

ertank
Posts: 172
Joined: Wed 13 Jan 2016 16:00

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ertank » Thu 06 Oct 2016 15:01

Dear Victor,

Thanks for the update. I personally couldn't solve the problem with your patch, too. Receiving same error message in the Delphi 10.1 Update 1 Starter Edition IDE. Maybe I am doing something wrong.

Would you advise when next version is planned to be released? So, I can wait and install fixed version.

Thanks.

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ViktorV » Mon 10 Oct 2016 11:58

We plan to release a new build of UniDAC that includes the fix this month.

wvisser
Posts: 6
Joined: Wed 11 Jan 2012 14:13

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by wvisser » Wed 19 Oct 2016 18:02

I have probably the same problem: I cannot normally open de data editor (probably using CRDBGrid) from the IBCquery editor while in the IDE. Same error 'Argument out of range' and then opens the data editor and also clears the SQL if you click on the SQL tabsheet again.
I rebuild CRDBGrid components but it does not help. I probably need to rebuild also the other component libs (with TIBCquery etc.) but do not have the code.

Very annoying.

Any tips or any outlook for a solution soon?

Thanks, Wilfried

ViktorV
Devart Team
Posts: 3168
Joined: Wed 30 Jul 2014 07:16

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by ViktorV » Thu 20 Oct 2016 12:31

To solve the problem, please try find and replace on your computer all copies of the crcontrols240.* and dclcrcontrols240.* files with the versions you compiled.

wvisser
Posts: 6
Joined: Wed 11 Jan 2012 14:13

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by wvisser » Thu 20 Oct 2016 13:25

Thanks,

I did not find any other that the ones I recompiled.

Are your sure that rebuilding the CRCGRID packages will solve the problem when using the TIBCquery (and other dataset controls) data editor in the IDE?
No need to build the TIBCquery package source?

regards, Wilfried

tomsoft
Posts: 6
Joined: Fri 29 Jan 2010 16:25

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by tomsoft » Wed 02 Nov 2016 06:47

Are dissatisfied because:
-two months have passed since the release update 1 of RadStudio Berlin;
-40 days have passed since the alert CRDBGrid fact that can not be used;
- the last month when you said that you came with a fix.
UniDac are on your customer for over 10 years. I wonder how I respond to this delay? It has already announced the launch soon of Berlin RadStudio update 2, that does not keep up with the release version is not good for my bussines.
When do I fix this problem?
I can keep CRDBGrid in my projects or must replace them with other grids?

tomsoft
Posts: 6
Joined: Fri 29 Jan 2010 16:25

Re: RAD 10.1 Berlin Update 1. Can't add CRDBGrid in form

Post by tomsoft » Wed 02 Nov 2016 12:53

Thanks for fixing this problem.
Respectfully,
Gregore Tomoiaga

Post Reply