DBGRID The default is only two columns, the method of adding columns can: 1 mouse right-click control, after selecting the Edit, continue right-click control, this time the right-click menu changes, there is insert, append, point you can add columns. Try more than twice! 2 Add a columns class in InputDataDlg.h, there is a member variable m_ncolumn indicates the number of columns, int m_ncolumn; in InputDataDlg.cpp // defines the header Tchar startle [6] [10] = {_t ("1"), _T ("2"), _ t ("3"), _ t ("4"), _ t ("5"), _ t ("6")}; //6 represents the number of columns, 10 generation header head length //// In the constructor: m_ncolumn = 6; // Initialized to 6 columns BOOL CINPUTDATADLG :: OnNInitdialog () {cdialog :: OnItDialog (); // Todo: add extra INIZATION HeRE m_datagrid.setcaption ("Upstream to this Tour") ; // The title of the control can also be directly modified in the attribute of the control (INT i = 2; I Sometimes the field name is English, we need to display Chinese characters, can be changed in SQL query statement, such as: select name as name, Phone AS phone from address this statement is selected from the table Address two columns, and Specifies the displayed column name "Name" and "Phone"