Thread: VCL.DBGrids.pas - Berlin Update1
|
Replies:
1
-
Last Post:
Oct 12, 2016 2:21 PM
Last Post By: Hal Burton
|
|
|
Posts:
5
Registered:
10/20/99
|
|
Start new vcl project.... drop one TDbGrid on it... Compile and Run
It will raise an exception: Argument out of range
+ line 2483 of VCL.DBGrids.pas -> if change it to include "if", it will work
function TCustomDBGrid.CanEditShow: Boolean;
begin
if SelectedIndex < Columns.Count then // correct except cause there are no Columns create yet.
begin
Result := (not Columns[SelectedIndex].ReadOnly) and (LayoutLock = 0) and
inherited CanEditShow;
end
else
Result := False;
end;
Edited by: Amarildo Lacerda on Sep 25, 2016 8:32 PM
Edited by: Amarildo Lacerda on Sep 25, 2016 8:44 PM
|
|
|
Posts:
4
Registered:
4/11/99
|
|
It appears the TDBGrid component problem I am having is related to this. My existing forms are failing to open in the IDE, reporting the TDBGrid.Options index out of range. The workaround I found is to edit the text in the .dfm file and remove the
dgAlwaysShowEditor option from the TDBGrid.Options list. My workaround is obviously not the best solution. Hopefully there will be a quick patch for this so we can proceed to move database applications to Berlin 10.1 Update 1 without using workarounds.
Start new vcl project.... drop one TDbGrid on it... Compile and Run
It will raise an exception: Argument out of range
+ line 2483 of VCL.DBGrids.pas -> if change it to include "if", it will work
function TCustomDBGrid.CanEditShow: Boolean;
begin
if SelectedIndex < Columns.Count then // correct except cause there are no Columns create yet.
begin
Result := (not Columns[SelectedIndex].ReadOnly) and (LayoutLock = 0) and
inherited CanEditShow;
end
else
Result := False;
end;
Edited by: Amarildo Lacerda on Sep 25, 2016 8:32 PM
Edited by: Amarildo Lacerda on Sep 25, 2016 8:44 PM
|
|
|
|
Legend
|
|
Helpful Answer
(5 pts)
|
|
Correct Answer
(10 pts)
|
|
Connect with Us