Project JEDI - Issue Tracker
Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0006082 [JEDI VCL] 00 JVCL Components major always 2013-02-14 13:01 2015-09-14 13:20
Reporter frank_jepsen View Status public  
Assigned To AHUser
Priority normal Resolution fixed  
Status resolved   Product Version 3.46
Summary 0006082: Fix for 5818 brought error in sizing columns in JvDBGrid
Description An reported error when autosizing columns in JvDBGrid (Mantis 5818) was "fixed" in 3.46.
This "fix" however causes wrong columns to be resized when the grid is scrolled to the right.
Additional Information To fix this I suppose to remove the fix in TJvDBGrid.CalcSizingState() and add this code at the end of this procedure:
if Index > ColCount - 1 then
  Index := ColCount - 1;
Tags No tags attached.
Attached Files zip file icon JvDbGrid-1.zip [^] (1,661 bytes) 2013-02-14 13:01

- Relationships

-  Notes
(0020425)
frank_jepsen (reporter)
2013-02-14 14:25

Sorry I was too quick. Allthough this is not resolved in the last release build 3.47, I just saw, that this issue was covered again in the last builds. With this change it also works for me.
(0020426)
frank_jepsen (reporter)
2013-02-14 14:51

With this change I can still produce an List Index Out Of Bounds Exception in the first example. In this example LeftCol is 1 and VisibleColCount is 1. So an Index of 2 could be calculated but it should be a maximum of 1. I think Index should be tested for ColCount-1.
(0020430)
stevegr (reporter)
2013-02-15 20:05

Hi frank,
I tested your code but unfortunately is producing problem for the right-most column when is partially displayed.

A fix is uploaded in 6069 issue.

Regards,
Stephen
(ADG)
(0020433)
frank_jepsen (reporter)
2013-02-18 11:46

Hi Stephen,

my approach was simple and pragmatic to resolve the List out of bounds exception. I can produce no problem with it, even in the case you pointed out.
What do you mean?

I only handled the symptom and you went to the source I think. I can't produce
any problems with either solution.

Regards
Frank
(0020434)
stevegr (reporter)
2013-02-18 13:04

Hi frank,
thank's for replying,

I reproduce problem only on the first column of the grid when displayed partially, it resizes the next column instead. Does NOT affect single-column grids.
I'll be happy to hear from you again.

Regards.
(0020435)
frank_jepsen (reporter)
2013-02-18 13:40

Hi Stephen,

you are right. I could reproduce this.

Your fix seems to handle all cases I tested.

I think it should be used for JVCL.

Regards
Frank
(0020501)
AHUser (developer)
2013-05-25 14:25

Fixed in svn revision 13517.

- Issue History
Date Modified Username Field Change
2013-02-14 13:01 frank_jepsen New Issue
2013-02-14 13:01 frank_jepsen File Added: JvDbGrid-1.zip
2013-02-14 14:25 frank_jepsen Note Added: 0020425
2013-02-14 14:51 frank_jepsen Note Added: 0020426
2013-02-15 20:05 stevegr Note Added: 0020430
2013-02-18 11:46 frank_jepsen Note Added: 0020433
2013-02-18 13:04 stevegr Note Added: 0020434
2013-02-18 13:40 frank_jepsen Note Added: 0020435
2013-05-25 14:25 AHUser Note Added: 0020501
2013-05-25 14:25 AHUser Status new => resolved
2013-05-25 14:25 AHUser Fixed in Version => Daily / SVN
2013-05-25 14:25 AHUser Resolution open => fixed
2013-05-25 14:25 AHUser Assigned To => AHUser
2015-09-14 13:20 obones Fixed in Version Daily / GIT => 3.48


Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker