DataGrid columns are added to a DataGrid via AddControl which looks like this:
Script Code:
<ww:wwWebDataGrid ID="gdCustomers" runat="server"> <Columns> <ww:wwWebDataGridColumn runat="server" id="colCompany" Expression="Company" HeaderText="Company" /> <ww:wwWebDataGridColumn runat="server" id="colCareOf" Expression="CareOf" HeaderText="Name" /> </Columns> </ww:wwWebDataGrid>
Fox Code:
THIS.gdCustomers = CREATEOBJECT("wwwebdatagrid",THIS) THIS.gdCustomers.Id = "gdCustomers" THIS.AddControl(THIS.gdCustomers) THIS.colCompany = CREATEOBJECT("wwwebdatagridcolumn",THIS) THIS.colCompany.Id = "colCompany" THIS.colCompany.Expression = [Company] THIS.colCompany.HeaderText = [Company] THIS.colCompany.UniqueId = [gdCustomers_colCompany] THIS.gdCustomers.AddControl(THIS.colCompany) THIS.colCareOf = CREATEOBJECT("wwwebdatagridcolumn",THIS) THIS.colCareOf.Id = "colCareOf" THIS.colCareOf.Expression = [CareOf] THIS.colCareOf.HeaderText = [Name] THIS.colCareOf.UniqueId = [gdCustomers_colCareOf] THIS.gdCustomers.AddControl(THIS.colCareOf)
| Member | Description | |
|---|---|---|
![]() |
CssClass | CSS class that is applied to each cell in this column. Applied to the individidual TD tag in the table. |
![]() |
Expression | The Expression used to evaluate the column display value. |
![]() |
FieldType | Explicit declaration of the FieldType for the resulting expression. |
![]() |
Format | A FoxPro Format expression applied to the value that is displayed. |
![]() |
HeaderAttributeString | Any additional attributes you might want to apply to the header each item in a column. This property basically allows you to override any cell behaviors. |
![]() |
HeaderText | Header text for the column that is displayed in the header row. |
![]() |
ItemAttributeString | Any additional attributes you might want to apply to each item in a column. This property basically allows you to override any cell behaviors. |
![]() |
Sortable | Determines whether a column is sortable. If it is sortable a SortExpression is applied to the column. |
![]() |
SortExpression | An optional SortExpression that is applied to a column if it is the currently sorted column. |
![]() |
Style | Style that is applied to each cell in this column. Applied to the individidual TD tag in the table. |