Solved

MSFlexGrid/VB5 : Multiselect rows ?

Posted on 1997-07-31
5
496 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…

726 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