By default, grid control gets its header text from the fieldname caption of a record value displayed in a grid column. To change the grid control header text, follow these steps:
1. Click Start > All Programs > Visual FoxPro 9.
2. Click File>New>Table>New File> Type the table name. For the sake of example, use tblNames as a filename>Click Save. Alternatively, you can type CREA tblNames in the command window. Enter the following fieldname captions and data type:
3. Then Click the Ok Button.
4. Press CTRL + F2 to view the command window. Type APPE then press enter. The APPE or APPEND commands pops-up the append window which enables you to add new records.
5. Add the following records:
6. Click the close button [x] to save the inputted records.
7. Create a new form by clicking File>New>Form>New File. Alternatively, type CREA form in the command window then press enter.
8. Click View> Form Control Toolbar(twice) to activate the toolbox window then click and drag a Grid control from the toolbox to your form.
9. Right-click the Grid control on your form>Select builder. A dialog box containing the following options should then appear:
10. Click the [>>] button. This transfers the fieldnames in the Available fields list box to the selected fields list box.
11. Click the layout tab. The following should then appear:
12. Click the grid control’s column header then enter your desired caption in the caption textbox.
13. Click the Ok button to apply the changes then press CTRL + E to run your form. Alternatively, you can click the run [!] icon.
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.