In addition to enabling users to move, resize, and hide grid columns from their screen, you can also do this via programming.
A grid with adjustable columns can present a significant programming challenge. To alleviate this, the grid control maintains two separate notions of the column order – one for the user and one for the program – as follows:
In a grid showing its default column layout, these two orderings are the same. Logical column 1 is physical column 1, and so on. However, when the user changes the column ordering on the screen (see Enabling User Grid Column Adjustments), the two notions of columns begin to differ, with the grid control managing the physical vs. logical column numbering internally. While a physical column number might change, its corresponding logical column number does not.
For example, suppose a customer's street address is normally shown on the screen of a particular grid in physical column 3; however, in this case, the user has moved it to physical column 5. If your program gets the cell data from column 3, it fetches the street address information from logical column 3 even though the position of the column is now physical column 5. In this case, when you position the cursor to logical column 3, it appears on the screen in column 5.
This makes programming the grid much simpler. In most cases, from a programming perspective, you can just ignore when the user has moved columns around on the screen as if this hasn't happened.