Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Pre loading items
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Pre loading items

 Post Reply Post Reply
Author
Message
rdeboer View Drop Down
Groupie
Groupie


Joined: 29 April 2004
Location: Netherlands
Status: Offline
Points: 81
Post Options Post Options   Thanks (0) Thanks(0)   Quote rdeboer Quote  Post ReplyReply Direct Link To This Post Topic: Pre loading items
    Posted: 28 July 2006 at 7:33pm

In my program I load a lot of items into the reportcontrol, let's say 15.000 rows.

To prevent long waiting time I populate the control every 1000 records:
 
    If t Mod 1000 = 0 Then
        frmArticles.ArticlesControl.Populate
    end if
 
While the reportControl still loads additional items, I browse the visible items, scroll down in the list and click items.
 
But every time the ReportControl.Populate command is issued, it jumps back to the top of the list.
 
Is there a solution or workaround for this?
 
 
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 30 July 2006 at 7:50pm
You can handle this in a following way:
- catch SelectionChanged event;
- focused row changes, and you store a Record of this row (ReportControl.FocusedRow.Record);
- after repopulating use: Set pRow = wndReportControl.Rows.FindRow pStoredRecord
- and select this row as focused: wndReportControl.FocusedRow = pRow

--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.