Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - Select All in 13.2 ?
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Select All in 13.2 ?

 Post Reply Post Reply
Author
Message
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Topic: Select All in 13.2 ?
    Posted: 23 September 2009 at 12:08pm

Hi Mark

In 13.1, for select all in virtual mode i used this code :
 
    Me.wndReportControl.Navigator.MoveFirstRow
    Me.wndReportControl.Navigator.MoveLastRow True
 
In 13.2 this code do nothing !
How can i make a "select all" in virtual mode please ?
Thank you.
 
 
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 2:37pm
Hi, Lodep59,
I tried this code - similar to your one -
 
wndReportControl.Navigator.MoveFirstRow
wndReportControl.Navigator.MoveToRow TotalRowCount, True
 
it works (in our sample TotalRowCount = 1000000)
 
btw - in VirtualMode you always know TotalRowCount as it used as param to set virtual mode
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 3:42pm
Yes, don't understand really why but this work :
 
Me.wndReportControl.navigator.MoveToRow 0, False
Me.wndReportControl.navigator.MoveToRow Me.ReportDataGrid.Rows.Count, True
 
For the "Movetorow 0" --> if you select row 10 and use "MoveFirstRow" the row n°10 stay selected.
Note that MoveToRow 1 select the row n°2... not really logical !
 
So, MoveFirstRow et MoveLastRow don't work in virtual mode. You'll need to note it in help file
A "SelectAll" method may be great 
 
Thank you Mark, without these little problems the report control become a great control, very powerfull.
A few more enhancements and corrections and it will be perfect !
 
 
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:00pm
We have SelectAll (Ctrl+A) method in non-virtual mode. I consider SelectAll in virtual mode less than logical as usual in virtual mode you have huge number of records....
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:31pm
And why having a high number of rows makes "select all" method less logical ?
I'm using virtual mode in my apps (and a very high numbers of rows - more than 100.000) and "select all" is very usefull !
 
The proof is that with the new 13.2 version, my "select all" method doesn't work anymore (the reason of this post) and you can believe in me that my users are not happy
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:36pm
OK  - but you can also understand that YOUR SelectAll method will be changed on YOUR NEW SelectAll method. This is life.... Custom method...
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:50pm

Did i said the contrary ?

I just said that a "SelectAll" method could be interresting, you know, just to avoid these dirties "custom methods"...
And, just for information, what I can't understand is that the "MoveFirstRow" and "MoveLastRow" doesn't work now... But, yes, i've updated my custom method... and now it works. Thank you.
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 4:50pm
I agree - but don't want to add it TODAY - let's release gone first
 
 
you can use Control + A - please try
 
and this is a code behind:

void CXTPReportControl::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags) {

.............................................
case 'A':

if (!IsVirtualMode() && IsSelectionEnabled() && !bShiftKey && bControlKeyOnly) {

_SelectRows(GetRecords());

RedrawControl(); }

break;

Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 23 September 2009 at 5:43pm
So finally I add a case:

else if (IsVirtualMode() && IsSelectionEnabled() && !bShiftKey && bControlKeyOnly) {

GetNavigator()->MoveToRow(0);

GetNavigator()->MoveToRow(GetRecords()->GetCount(), TRUE);

RedrawControl(); }

and it works
and use Control + A
 
I confirmed result for VB VirtualList sample and for my MFC EditVirtualListIcon sample
Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2009 at 1:31am
It works ! :)
Just a precision, you can replace :
 

GetNavigator()->MoveToRow(0);

GetNavigator()->MoveToRow(GetRecords()->GetCount(), TRUE);
 
By
 

GetNavigator()->MoveToRow(0);

GetNavigator()->MoveToRow(GetRecords()->GetCount() -1 , TRUE);
 
In fact I note that Naviator go to row which index = parameter.
That's why you need to use "MoveToRow(0)" to select first line.
 
In any way, thank you for implementing this :)
I don't need my custom method anymore !
 
Have a nice day.
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
Back to Top
mdoubson View Drop Down
Senior Member
Senior Member
Avatar

Joined: 17 November 2008
Status: Offline
Points: 1705
Post Options Post Options   Thanks (0) Thanks(0)   Quote mdoubson Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2009 at 8:36am

Sure - it was just proto - SVN code here:

case 'A':

if (IsSelectionEnabled() && !bShiftKey && bControlKeyOnly) {

if (IsVirtualMode()) { GetNavigator()->MoveToRow(0); GetNavigator()->MoveToRow(GetRecords()->GetCount() - 1, TRUE); }

else { _SelectRows(GetRecords()); }

RedrawControl(); }

Back to Top
Lodep59 View Drop Down
Senior Member
Senior Member
Avatar

Joined: 03 April 2008
Status: Offline
Points: 203
Post Options Post Options   Thanks (0) Thanks(0)   Quote Lodep59 Quote  Post ReplyReply Direct Link To This Post Posted: 24 September 2009 at 8:44am
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate
Language: VB6 SP6 (FR)
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.172 seconds.