1.AspxGridView column Type
Gridviewcommandcolumn: command button columns
Gridviewdatacolumn: Basic Data columns
Gridviewdatabinaryimagecolumn: Binary image columns
Gridviewdatabuttoneditcolumn: Edit button columns
Gridviewdatacheckcolumn: check box column
Gridviewdatacomboboxcolumn: Combo Box column
Gridviewdatadatecolumn: Date column
Gridviewdatahyperlinkcolumn: Hyperlink Column
Gridviewdataimagecolumn: Image Column
Gridviewdatamemocolumn: Large text column
Gridviewdataprogressbarcolumn: Progress bar Column
Gridviewdataspineditcolumn: Fine-tuning The Mask column
Gridviewdatatextcolumn: Text column
Where Gridviewcommandcolumn and Gridviewdatacolumn are similar, they inherit from Gridviewcolumn.
The Gridviewdatatextcolumn class inherits from the Gridvieweditdatacolumn,gridvieweditdatacolumn inherited from Gridviewdatacolumn, Other data columns are directly inherited from Gridviewdatacolumn.
Gridviewcolumn is an abstract class, and you cannot declare a field directly as a Gridviewcolumn class.
2.GridViewColumn server-Side important properties
Property name |
Data type |
Description |
Caption |
String |
The column header text. can read and write. |
CellStyle |
Gridviewcellstyle |
Field style. Read-only. |
Collection |
DevExpress.Web.ASPxClasses. Collection |
The column belongs to the collection. Read-only. |
Fixedstyle |
Gridviewcolumnfixedstyle (enumeration) |
The style when the field freezes. can read and write. Value range: left, fixed; none: not fixed. |
Footercellstyle |
Gridviewfooterstyle |
Footer field style. Read-only. |
FooterTemplate |
ITemplate |
The cell template where the column footer is located. can read and write. |
Grid |
Aspxgridview |
The field belongs to the Aspxgridview. Read-only. |
Groupfootercellstyle |
Gridviewgroupfooterstyle |
The footer field is grouped with styles. Read-only. |
Headercaptiontemplate |
ITemplate |
The field header template. can read and write. |
Index |
Int |
Column ordinal. can read and write. |
Name |
String |
The field name. can read and write. |
Showincustomizationform |
Bool |
Whether the field header (when the field is hidden) appears in the custom window. can read and write. |
ToolTip |
String |
Micro Help. can read and write. |
Visible |
Bool |
is displayed. can read and write. |
Visibleindex |
Int |
The display order. can read and write. |
Width |
Unit |
Width. can read and write. |
3.GridViewColumn server-side approach
method name |
syntax |
Chinese Description |
Assign |
Void Assign (DevExpress.Web.ASPxClasses. Collectionitem source) |
copies the public property from the specified object to the current field. |
isclickable |
bool Isclickable () |
determines whether a field can respond to a mouse click event. Returns True when the field has a header or Aspxgridview allow sorting (settingsbehavior.allowsort) or allows the field to drag (Settingsbehavior.allowdragdrop), otherwise false is returned. |
setcolvisible |
void setcolvisible (bool value) |
sets whether the field is visible. Equivalent to the Visible property. |
setcolvisibleindex |
Void setcolvisibleindex (int value) |
sets the order in which columns are displayed. Equivalent to the Visibleindex property. |
autofilterby |
Void Autofilterby (string value) |
automatic filtering based on specified field values |
(1) Examples of assign methods
Note After you call the Assign method, the current field includes the name, and the data is consistent with the replication source. If you want to make some properties, such as post-replication data, different from the replication source, you should re-change after calling this method. Typically used to dynamically create columns.
Cases:
Gridviewdatacolumn C = (gridviewdatacolumn) ( This. aspxgridview1.columns["Creator"]); This. aspxgridview1.columns["Creator"]. Assign ( This. aspxgridview1.columns["Logid"]); C.fieldname="Creator"; C.name="Creator"; C.caption="Creator"
4.GridViewCommandColumn: Command Button Column
(1) Example of column sound
<dxwgv:gridviewcommandcolumn caption="Select"Name="Isselect"Buttontype="Button"showselectcheckbox="true"></dxwgv:gridviewcommandcolumn><dxwgv:gridviewcommandcolumn caption="Operation"visible="true"> <updatebutton text="Save"visible="true"/> <newbutton text="New"visible="true"/> <cancelbutton text="Cancel"visible="true"/> <clearfilterbutton text="Clear"visible="true"/> <selectbutton text="Select"visible="true"/></dxwgv:gridviewcommandcolumn>
(2) Gridviewcommandcolumn server-Side important properties
Property name |
Data type |
Chinese description |
Allowdragdrop |
Defaultboolean (enumeration) |
Whether to allow columns to be dragged. can read and write. Value range: True,false,default |
ButtonType |
ButtonType (enumeration) |
The button type. can read and write. Value range: Button, Image, Link |
CancelButton |
Gridviewcommandcolumnbutton |
Cancel button. Read-only. |
Clearfilterbutton |
Gridviewcommandcolumnbutton |
Clears the filter criteria button. Read-only. |
Custombuttons |
Gridviewcommandcolumncustombuttoncollection |
A custom button collection. Read-only. |
DeleteButton |
Gridviewcommandcolumnbutton |
Delete button. Read-only. |
Editbutton |
Gridviewcommandcolumnbutton |
Edit button. Read-only. |
Newbutton |
Gridviewcommandcolumnbutton |
New button. Read-only. |
Selectbutton |
Gridviewcommandcolumnbutton |
Select the button. Read-only. |
Showselectcheckbox |
Bool |
Whether to display the selection box. can read and write. |
UpdateButton |
Gridviewcommandcolumnbutton |
Save button. Read-only. |
5. Gridviewdatacolumn: Basic data column
(1) Example of column sound
<dxwgv:gridviewdatacolumn caption="logid" fieldname="logid" readonly="true" > </dxwgv:GridViewDataColumn>
(2) Gridviewdatacolumn server-Side important properties
Property name |
Data type |
Chinese description |
Dataitemtemplate |
ITemplate |
The current field displays the cell template for the data. can read and write. |
Editcellstyle |
Gridvieweditcellstyle |
The style when the field is edited. Read-only. |
Editformcaptionstyle |
Gridvieweditformcaptionstyle |
The header style when the field is edited. Read-only. |
Editformsettings |
Gridcolumneditformsettings |
Settings for columns in the edit window |
EditItemTemplate |
ITemplate |
The cell template for the current field to edit data. can read and write. |
FieldName |
String |
Database column name. can read and write. |
Filtercellstyle |
Gridviewfiltercellstyle |
The style of the field on the Auto-filter toolbar. Read-only. |
FilterExpression |
String |
Field filter expression. Read-only. The Autofilterbycolumn () method that calls Aspxgridview automatically sets the field filter expression. |
Groupindex |
Int |
Column grouping hierarchy. can read and write. |
Propertiesedit |
Editpropertiesbase |
The field editor settings. can read and write. |
Propertiesedittype |
String |
The column editor type. can read and write. |
ReadOnly |
Bool |
is read-only. can read and write. |
Settings |
Gridviewdatacolumnsettings |
An object that provides access to the field options. Read-only. |
SortIndex |
Int |
Column sort order. can read and write. |
SortOrder |
Columnsortorder (enumeration) |
How to sort columns. can read and write. Value range: none,ascending, descending |
Unboundtype |
Unboundcolumntype (enumeration) |
field-bound data type. can read and write. Range of values: Bound,integer,decimal, DateTime, String,boolean,object. |
(3) Gridviewdatacolumn server-Side Important method
method name |
syntax |
Chinese Description |
Assign |
Void Assign (DevExpress.Web.ASPxClasses. Collectionitem source) |
copies the public property from the specified object to the current field. |
autofilterby |
Void Autofilterby (string value) |
automatic filtering based on specified field values |
GroupBy |
void GroupBy () |
is grouped by the current field. You can call the Ungroup method to break the grouping. |
sortascending |
void sortascending () |
Sort by current field value |
Td>sortdescending
Void sortdescending () |
sorted in reverse order of current column values |
UnGroup |
void UnGroup () |
cancels the current column grouping |
unsort |
Void unsort () |
cancel the current column sort |
6.GridViewDataButtonEditColumn: Edit Button Column
(1) Example of column sound
<dxwgv:gridviewdatabuttoneditcolumn caption=" remarks " fieldname="Remark " ><propertiesbuttonedit nulltext=" empty " /></DXWGV: Gridviewdatabuttoneditcolumn>
(2) Unique attributes
Gridviewdatabuttoneditcolumn inherits from Gridviewdatacolumn, which includes the following unique properties:
Property name |
Data type |
Chinese description |
Propertiesbuttonedit |
Buttoneditproperties |
Field Editor Properties |
7.GridViewDataCheckColumn: check box column
8.GridViewDataTextColumn: Text column
Source:. NET Learning Network
Description: All sources are . NET Learning Network articles are original, if reproduced, please mark this page address in the reprint, thank you!
14.AspxGridView column editing style