Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

MSFlexGrid/VB5 : Multiselect rows ?

Posted on 1997-07-31
5
Medium Priority
?
502 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 400 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

715 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