Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help On GRID required
Message
 
À
07/04/2013 12:23:20
Information générale
Forum:
Visual FoxPro
Catégorie:
Programmation Orientée Object
Divers
Thread ID:
01570327
Message ID:
01570361
Vues:
68
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform