Solved

TwwDbGrid.SelectedList.Count not working

Posted on 2006-10-25
5
757 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…

860 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