Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Report Control
  New Posts New Posts RSS Feed - Default focus row problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Default focus row problem

 Post Reply Post Reply
Author
Message
fatbone77 View Drop Down
Newbie
Newbie


Joined: 10 January 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatbone77 Quote  Post ReplyReply Direct Link To This Post Topic: Default focus row problem
    Posted: 10 January 2007 at 10:50pm

I have a frequently updated table. when user navigating the table by sliding scollbar, the table jumps back to first row when an update on the table occurs.


is it possible for a table to not anatomically have a focus row unless user explicitly click on it.

btw, i'm using V10.4.

 
Back to Top
larryp View Drop Down
Groupie
Groupie


Joined: 15 January 2005
Location: United States
Status: Offline
Points: 61
Post Options Post Options   Thanks (0) Thanks(0)   Quote larryp Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2007 at 3:05pm
You code try something like the following:
 

int nTopRowIndex = GetReportCtrl().GetTopRowIndex();

// ***** Do your table update here *******

GetReportCtrl().SetTopRow ( nTopRowIndex );

Although, if the table update occurred before the top row being displayed you might slightly be off.  But you know how many rows would be added so you could offset accordingly.
 
-- Larry
Back to Top
fatbone77 View Drop Down
Newbie
Newbie


Joined: 10 January 2007
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote fatbone77 Quote  Post ReplyReply Direct Link To This Post Posted: 11 January 2007 at 11:02pm

thank for your reply very much. That might solve my problem.

but this should be done on case-by-case base. why need a default focus row, when nobody click on the rows? just like normal list-control under windows.
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.