Select All in 13.2 ? |
Post Reply |
Author | |
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
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) |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
Yes, don't understand really why but this work :
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) |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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....
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
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) |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
OK - but you can also understand that YOUR SelectAll method will be changed on YOUR NEW SelectAll method. This is life.... Custom method...
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
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) |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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; |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
So finally I add a case:
else if (IsVirtualMode() && IsSelectionEnabled() && !bShiftKey && bControlKeyOnly) {
GetNavigator()->MoveToRow(0); GetNavigator()->MoveToRow(GetRecords()->GetCount(), TRUE); RedrawControl(); } and it works
please try recent updated ocx - https://forum.codejock.com/uploads/BetaOCX/ReportControlBeta13-2.rar
and use Control + A
I confirmed result for VB VirtualList sample and for my MFC EditVirtualListIcon sample
|
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
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) |
|
mdoubson
Senior Member Joined: 17 November 2008 Status: Offline Points: 1705 |
Post Options
Thanks(0)
|
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(); } |
|
Lodep59
Senior Member Joined: 03 April 2008 Status: Offline Points: 203 |
Post Options
Thanks(0)
|
|
|
Product: Xtreme SuitePro (ActiveX) last version
Platform: Windows 7 Ultimate Language: VB6 SP6 (FR) |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |