Class wwWebDataGridColumn
A Web Data Grid Column provides attributes for a child column inside of a Web Data Grid.
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)
Class Members
| 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. This value can be any FoxPro expression including a Cursor/Table Fieldname, variable, object property, UDF() or class method… | |
| FieldType | Explicit declaration of the FieldType for the resulting expression. This value is optional for most expressions, as Web Connection figures out the type at runtime. However, it's important to provide… | |
| Format | A FoxPro Format expression applied to the value that is displayed. This can be a FoxPro Format expression like @! or @YL or a function call. You can also use functions or methods for formatting by… | |
| 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… | |
| HeaderText | Header text for the column that is displayed in the header row. The header text can be specified as a static string or - if prefixed with an = - an expression. For example, if you wanted to display… | |
| 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. Example: ItemAttributeString="align='right'… | |
| 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. | |
