Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Show a column in a grid
Message
From
12/10/2014 14:54:47
Al Doman (Online)
M3 Enterprises Inc.
North Vancouver, British Columbia, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01609190
Message ID:
01609193
Views:
57
>Hi all,
>
>I have a grid with 20 columns.
>it 's possible to see 10 columns.
>
>I want see the twelve column.
>
>I try in a commandButton
>
>this.parent.mygrid.column12.setfocus()
>
>
>it is Bad
>
>what can i do to see the twelve column ?

Assuming you can't make the grid wider, or the first 11 columns narrower, you can programmatically scroll the grid using its .DoScroll() method.

Another approach I've used is to selectively make grid columns Visible or not Visible. If you have a lot of grid columns, it may be that the user is not always interested in seeing all of them at once. I've sometimes used checkboxes associated with the grid, with captions like "Show columns 2 - 6", "Show columns 7 - 11" etc. Of course you'd use something more meaningful in your real application. When those checkboxes are checked/unchecked, their associated columns become visible or invisible.

If you have a lot of columns and the user really does need to see them all at once, you might be better off having only a few important columns in the grid, and display the other columns in separate controls/fields next to the grid.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Reply
Map
View

Click here to load this message in the networking platform