Page 1 of 2

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

Posted: Wed 21 Sep 2016 19:32
by tomsoft
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

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

Posted: Thu 22 Sep 2016 10:46
by azyk
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.

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

Posted: Tue 27 Sep 2016 22:26
by ertank
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.

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

Posted: Thu 29 Sep 2016 09:02
by rickyarzu
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;

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

Posted: Thu 29 Sep 2016 10:17
by ertank
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.

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

Posted: Sat 01 Oct 2016 07:21
by rickyarzu
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.

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

Posted: Sat 01 Oct 2016 14:18
by ertank
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.

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

Posted: Wed 05 Oct 2016 15:07
by ViktorV
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.

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

Posted: Thu 06 Oct 2016 15:01
by ertank
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.

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

Posted: Mon 10 Oct 2016 11:58
by ViktorV
We plan to release a new build of UniDAC that includes the fix this month.

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

Posted: Wed 19 Oct 2016 18:02
by wvisser
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

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

Posted: Thu 20 Oct 2016 12:31
by ViktorV
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.

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

Posted: Thu 20 Oct 2016 13:25
by wvisser
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

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

Posted: Wed 02 Nov 2016 06:47
by tomsoft
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?

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

Posted: Wed 02 Nov 2016 12:53
by tomsoft
Thanks for fixing this problem.
Respectfully,
Gregore Tomoiaga