DBGrid columns question lazarus / 16-Databases ---------------------------------------------------------------------- xinyiman · 2011-10-11 09:41 Question: in a DBGrid, you can add one or more columns that are not part of the datasource? In order to use them as variables of support? If you explain to me how? You can also change the order of the columns from code? Without going to work on the query? thanks ---------------------------------------------------------------------- goodname · 2011-10-11 12:54 Double clicking on the DBGrid in development will bring up a display where you can add, remove, edit title, and change the display order of columns. Have never tried to display something that was not in the query. ---------------------------------------------------------------------- 99Percent · 2011-10-12 02:17 You will need to use a datasource anyway. What I usually do in these cases is use a in-memory dataset like TMemDataSet or TRxMemoryData copy the data from a query dataset and then add the fields programatically.