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 Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

A Grid Of Selected And A Grid Of Unselected

Status
Not open for further replies.

PaidtheUmpire

Programmer
Jan 4, 2004
105
AU
I am trying to get a pair of grids on my Delphi 7 program, one of which would have a list of all the items that a client can access his keycard. With the other grid showing all the items which the user can't access with his card.

With a pair of buttons allow the user to move items from one grid to the other grid. The list of items is in an Access table called "Vehicle" with the connectiion between the client "User" and the items in the MANY-TO-MANY stoping "UserItem" table.

Any ideas?
I got it kind of working through StringGrids, but after an item is moved accross to the other grid the screen will not update till it is refreshed two or three times.

I'm using Delphi 7.

Delphi, Delphi, Delphi. Oi! Oi! Oi!
 
Perhaps I'm missing something here but the obvious thing to me is to use two TDBGrids linked (using two TDataSources) to two TQuerys.

Andrew
Hampshire, UK
 

I generally use TListBox components for this sort of thing. But if you don't mind immediate update to the databse, Andrew's idea is a good one.

I prefer to allow the user to work on screen and not actually update the database until a specific action (such as a button click) is taken. This allows for the user to be able to cancel out at any time without my having to keep a list of un-do steps or an image of the "before" condition.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top