Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: VCL.DBGrids.pas - Berlin Update1



Permlink Replies: 1 - Last Post: Oct 12, 2016 2:21 PM Last Post By: Hal Burton Threads: [ Previous | Next ]
Amarildo Lacerda

Posts: 5
Registered: 10/20/99
VCL.DBGrids.pas - Berlin Update1
Click to report abuse...   Click to reply to this thread Reply
  Posted: Sep 25, 2016 8:27 PM
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

Hal Burton

Posts: 4
Registered: 4/11/99
Re: VCL.DBGrids.pas - Berlin Update1
Click to report abuse...   Click to reply to this thread Reply
  Posted: Oct 12, 2016 2:21 PM   in response to: Amarildo Lacerda in response to: Amarildo Lacerda
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.

Amarildo Lacerda wrote:
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)

Server Response from: ETNAJIVE02