DevExpress Table Control Gridcontrol set interlaced, focus line color, set (change) display value, fixed column does not move (with source)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.