Solved

MSFlexGrid/VB5 : Multiselect rows ?

Posted on 1997-07-31
5
499 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses
Course of the Month11 days, 11 hours left to enroll

623 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