Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help On GRID required
Message
 
To
07/04/2013 12:23:20
General information
Forum:
Visual FoxPro
Category:
Object Oriented Programming
Miscellaneous
Thread ID:
01570327
Message ID:
01570361
Views:
69
>I am new to grids. I have a form in which I have a 9 column grid. But when the form is run, the Grid shows 10 column (i.e one additional unwanted column at extreme right). Please see the attached Screen shot.
>
>Second, I have used SQL to create a table and the table is the source for the above Grid.(Table Name Searchreport)
>The Table is Order By Invoice No. Now, I am looking forward to do that when the user Clicks on the Header column, the Grid items shall be sorted by the header on which click is made.
>
>Will I have to copy the same select statement statement inside Grids.header.click and refresh the Grid or there is some other trick also.
>
>Harsh

As others said, the column on the right is blank so adjust the width as needed. If the grid is too narrow the columns will shift when you enter the far right or left column.

As for having the sort order change by clicking on the header you need to first create an index on the cursor (you are using a cursor right?) for each column's field. Then in the click event of each column heading put the following code:
 set order to (whatever the index tag is)
Thisform.refresh()
Beer is proof that God loves man, and wants him to be happy. - Benjamin Franklin
John J. Henn
Previous
Reply
Map
View

Click here to load this message in the networking platform