Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I add MultiSelect functionality to a grid? 1

Status
Not open for further replies.

ChrisRChamberlain

Programmer
Mar 23, 2000
3,392
GB

FAQ ERROR!

It's taking time to restore some of the functionality of the old site to the new site, and I am sure we all wish the management every speed in their endeavours.

Unfortunately, one temporary omission is the ability to edit a FAQ, and FAQ184-433 is missing the following:-


In the .Click() event of .Text1/other in each Column in the grid put:-

THISFORM.SelectRecords()


Chris (-:
 
Hi Chris,

FWIW, at UniversalThread.com, there is a Multi-Select grid class created by Cetin Basoz.

Additionally, there is a container class that includes the Multi-Select grid class and contains a few other "goodies" created by Nadya Nosonovsky.

I havent used either, so maybe you can test them and comment on their value. Why re-invent the wheel? Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Jon

If you can give directions to their location at UniversalThread.com, I will.

Chris
 
Hi Chris,

Go to and register as a user.

Sign in. In the left pane, click on the <Files> section. In the files section, click on the <Classes - VCX> category. File #1222 named 'Container with Multiselect grid' is Nadya's class.

Unfortunately I was unable to locate Cetin's class(although I didnt dig very hard). It should accompany Nadya's class or you could email Cetin directly and find out if he removed it from public domain. Jon Hawkins
jonscott8@yahoo.com

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Jon

Identifying the MultiSelect grid options by site

[tt] Universal Tek-Tips
Class library Yes Optional
Classes available 7 *2
Exclude records Yes Optional
Clear button Yes Optional
Approx lines code 550+ 120
Create scope clause No Yes
Add to existing grid No Yes
[/tt]
* A custom class is available to replace form properties/method, as is a grid class for new projects.

Why re-invent the wheel? was the question you posed, and the answer is because the wheel didn't exist, as far as I could tell.

The criteria was to be able to add the MultiSelect functionality to a grid, which the Universal version does not allow.

If you are creating a new form, then either version is fine - but if you want to add the functionality to an existing form with a grid, you have to replace the grid class.

The Tek-Tips version allows you to simply drop the custom class onto the form, and add the odd line of code to the .Init(), .AfterRowColChange() and .Text1.Click() events.

The other feaure of the Tek-Tips version is the scope clause created, apparently not available in the Universal.

At least now, unless there are any more out there, you have a couple of choices.

Chris :)

 
Further error and apologies

Line 14 in SelectRecords() event should be:-

IF .lShiftClick AND !&amp;lcMarked

Chris :~/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top