Describes some of the commonly used Gridcontrol settings.
1, set the interlaced color. First set the display of interlaced color, steps: Optionsview-->enableappearanceevenrow-->true and optionsview-->enableappearanceoddrow--> true; then set odd and even line style colors, etc.: Appearance-->evenrow and Appearance-->oddrow. When the design is complete, the designer has an interlaced effect:
2. When you set the odd-even row style, you see other line styles. Appearance-->foucsedrow is the focus line color, which is set to highlight the focus line style:
3, set the display value, there are two ways. The first type can be set in the local, the column will be added to the unit, the most commonly used is to set the date style yyyy mm month DD Day:
The second can be changed with code as follows:
/// <summary> ///Change the display value/// </summary> Private voidGridview1_customcolumndisplaytext (Objectsender, DevExpress.XtraGrid.Views.Base.CustomColumnDisplayTextEventArgs e) { if(E.column.fieldname = ="A3") { if(e.value.tostring () = ="1") E.displaytext="male"; ElseE.displaytext="female"; } }
4, sometimes there are too many table columns, you need to drag to view, but you want some columns can always be fixed do not move. This time you can set the column to be fixed, properties:
5. Operation:
6, Case source download (no points required): http://download.csdn.net/detail/kehaigang29/8856261
DevExpress Table Control Gridcontrol set interlaced, focus line color, set (change) display value, fixed column does not move (with source)