Solved

MSFlexGrid/VB5 : Multiselect rows ?

Posted on 1997-07-31
5
491 Views
Last Modified: 2012-05-04
G'day to you !

I'm using a FlexGrid to display multiple-fields records.
I'd like to enable the user to make a multiple rows selection, like in a ListView/(Report mode) control, or in a TrueDBGrid, in order to print the selected records.

Is the MultiSelect property missing or renamed, or I'll have  to use several others properties ?
Any others ideas ?

All my thanks in advance, and t10x 4 u'r precious time !

Regards
0
Comment
Question by:Krosos
  • 2
  • 2
5 Comments
 
LVL 3

Expert Comment

by:ESI
ID: 1429171
I don't think it's possible to do multiple rows selection, in all the cases not when MergeCells <> 0 for obvious reasons.

0
 

Expert Comment

by:Solo
ID: 1429172
I suppose u mean non-adjacent selection.
Try to change the background color of the entire row as the user click/select it (set a different color as the normal background selection color to differentiate your custom selection).
Or/And use an array of boolean for every row of the grid that has been (un)selected.
For the properties, use MergeCells = 0, AllowBigSelection = True,  FocusRect = 0, SelectionMode = 1, HighLight = 1, FillStyle = 1

Hope it works (not tried !), bye
0
 

Author Comment

by:Krosos
ID: 1429173
Every time I click on another row, the grid repaint itself & I lose the previous selection
Any others solutions ?
0
 
LVL 3

Accepted Solution

by:
ESI earned 100 total points
ID: 1429174
Krosos,
Then try to set the .Redraw property of the grid to False then eventually refresh the selected rows accordingly to the array of booleans and then finally set the Redraw property back to True.
btw, set the AllowFocusRect or FocusSelection (don't remember now) to None, to have full selected rows.(all columns).

Hope it helps !
CU
0
 

Author Comment

by:Krosos
ID: 1429175
I had to adjust some lines but it finally works, and it seems the grid is faster now !? The selection focus rect. help'd too
Thanks & bye
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now