Professional Documents
Culture Documents
http://msdn.microsoft.com/en-us/library/2c84bwwk(v=vs.80).aspx
Tip
If you want to be able to center a check box in a grid column, create a container class, add a check box to the container class, and adjust the position of the check box in the container class. Add the container class to the grid column and set the ControlSource of the check box to the desired field.
1 of 2
10/13/2012 12:17 AM
http://msdn.microsoft.com/en-us/library/2c84bwwk(v=vs.80).aspx
3. Press the DELETE key. You also can add controls to a grid column using the AddObject Method in code.
THIS.grcColumn1.AddObject("spnQuantity", "SPINNER") THIS.grcColumn1.AddObject("cboQuantity", "COMBOBOX") THIS.grcColumn1.CurrentControl = "spnQuantity" * The following lines of code make sure the control is visible * and is diplayed in every row in the grid THIS.grcColumn1.spnQuantity.Visible = .T. THIS.grcColumn1.Sparse = .F. In this example, Column1 has three possible current control values:
spnQuantity cboQuantity Text1
Note
Properties set on the Grid level are not passed on to the columns or headers. In the same way, you must set properties of the headers and contained controls directly; they do not inherit their properties from settings at the Column level.
Tip
For the best display of combo boxes in grid columns, set the following combo box properties:
BackStyle = 0 && Transparent Margin = 0 SpecialEffect = 1 && Plain BorderStyle = 0 && None
2 of 2
10/13/2012 12:17 AM