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

Grid problem

Status
Not open for further replies.

cameron40

Programmer
Sep 21, 2004
4
0
0
GB
I have a grid on pageframe page1 the grid is filled with data from db on form load. I would like to click on a row in grid and page2 of pagefram become active. I put the following code in grid1 'click' and grid1 'activecell' but nothing happens any ideas welcome.

This.Parent.Parent.activepage = 2
 
Try placing your code in the grid's AfterRowColChange event. The grid will only receive a click event if there is no other contained control under the area being clicked...so it is useless for your purposes unless you were to put some code in the contained objects to send there click events up to the grid (delegation of sorts). In any event, you'll want to use the AfterRowColChange event...just check the current record for whatever identifying info is available and switch your activepage appropriately. Some extra code would be needed if perhaps the user coudl switch the activepage and then go back into the grid and select the same row/column it is already on, but for now, give this idea a shot and any limitations with this approach will soon be shown. Then post back if it is still not acting the way you want it to.

boyd.gif

 
Thanks craigsboyd seems to be working how i want :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top