Jump to content


4rc

Member Since 10 Sep 2007
Offline Last Active Apr 12 2010 04:55 PM
-----

Topics I've Started

Scroll problem, TNxGridDataLink.DataEvent

13 December 2008 - 07:45 PM

Hi,

(NextSuiteVer = '4.9.8.1', D2007, Advantage 9.1)

when I use a 'TnextDBGrid' in conjunction with a 'TadsTable' then I have serious problems with scrolling.
e.g: When the first row of the grid is selected and I scroll up using a 'TdbNavigator' then only the first row will be updated.

Therefore I changed the following line in 'TnxGridDataLink.DataEvent' (added deDataSetScroll):
if Event in [deDataSetChange, {$IFNDEF DELPHI6}deDisabledStateChange,{$ENDIF} deLayoutChange] then
into:
if Event in [deDataSetChange, {$IFNDEF DELPHI6}deDisabledStateChange,{$ENDIF} deLayoutChange, deDataSetScroll] then

Now scrolling via 'TdbNavigator' or keyboard is ok, only scrolling with the scrollbar button will show a wrong result, when dataset.EOF is true. IOW. selected row is the last record, then the record scrolls up, but not the last row. The rows will be filled with the prior record data:
e.g:
record 5
record 6
record 7
record 8
record 9 (last record)

after scrolling now down:
record 6
record 7
record 8
record 8
record 9 (last record)
...
The scrollbar buttons don't respect dataset.EOF nor dataset.BOF!

Any ideas?

IsRowInView problem

01 December 2008 - 09:40 PM

Hi,

I need to scroll a particular row in view if it is currently not visible. Therefore I tried to use method 'IsRowInView', but it doesn't worked as expected. Looking at the code of 'function TNxCustomGridControl.IsRowInView':

CODE
function TNxCustomGridControl.IsRowInView(const Index: Integer): Boolean;
begin
Result := SelectedRow < Pred(FFirstRow + GetVisibleCount);
end;


this method doesn't respect parameter 'Index'!
Here my corrected version:

Result := (Index < (FFirstRow + GetVisibleCount)) and (Index >= FFirstRow);

Best regards

OnRowMove problem

19 November 2008 - 08:17 PM

Hi,

I want to reorder two records in the OnRowMove event. But I have no glue how to achieve it with the provided FromPos/ToPos integer parameters, because there isn't a Rows[] property. These parameters are kind of useless IMO.
How can I access the rows involved in the RowMove process?

Cheers,
r4c;