Solved

TwwDbGrid.SelectedList.Count not working

Posted on 2006-10-25
5
747 Views
Last Modified: 2010-05-18
I am using D5 with InfoPower's TwwDbGrid.  I have enabled the multi-select option but whenever I try to access the SelectedList.Count property, no matter how many records I have selected, the value returned toggles back and forth between 0 and 1.  Any ideas what might be causing this?
0
Comment
Question by:bjones8888
  • 3
  • 2
5 Comments
 
LVL 8

Expert Comment

by:RickJ
ID: 17807926
I use TwwDBGrid and this seems to work fine for me.
At what stage are you reading the SelectedList.Count ?
Maybe post your code to make it easier to find your problem.
0
 

Author Comment

by:bjones8888
ID: 17811143
I've tried OnMultiSelectRecord, OnMouseUp, and OnKeyUp.  

I'm using an ADO connection and I noticed that the cursor type was a forward only cursor and thought that was the culprit somehow.  But even after changing that, it didn't help.

Perhaps the problem is that I'm using my own "home grown" table object (someone else wrote it for me - so I don't know everything that's under the hood).  Maybe I should try using a TAdoTable.
0
 
LVL 8

Accepted Solution

by:
RickJ earned 500 total points
ID: 17816704
Yes, try different table object.
The selectedlist is a list of TBookmarks, so your data/table would have to support bookmarks.
Sorry for delay, I think we have a big time zone difference!!
0
 

Author Comment

by:bjones8888
ID: 17816734
RickJ,

I believe you hit it.  I suspect that bookmarks are the culprit.  TDbGrid / TTable, as well as TwwDbGrid/TwwTable work just fine.  Thanks!
0
 
LVL 8

Expert Comment

by:RickJ
ID: 17816785
Thanks, Hope I helped in some way.
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

743 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

17 Experts available now in Live!

Get 1:1 Help Now