this.dgResult.CaptionText = "Hello";
这条代码是可以看到效果的。
其他就没有了。

解决方案 »

  1.   

    // C#
    private void addCustomDataTableStyle()
    {
       // Add a GridTableStyle and set the MappingName 
       // to the name of the DataTable.
       DataGridTableStyle TSAuthors = new DataGridTableStyle();
       TSAuthors.MappingName = "Authors";   // Add a GridColumnStyle and set the MappingName 
       // to the name of a DataColumn in the DataTable. 
       // Set the HeaderText and Width properties. 
       DataGridColumnStyle TCFirstName = new DataGridTextBoxColumn();
       TCFirstName.MappingName = " AV_FName";
       TCFirstName.HeaderText = "First Name";
       TCFirstName.Width = 75;
       TSAuthors.GridColumnStyles.Add(TCFirstName);   // Add the DataGridTableStyle instance to 
       // the GridTableStylesCollection. 
       dataGrid1.TableStyles.Add(TSAuthors);
    }
      

  2.   

    设置 Windows 窗体 DataGrid 控件的格式
    ms-help://MS.MSDNQTR.2003FEB.2052/vbcon/html/vbtskformattingthedatagridatdesigntime.htm
      

  3.   

    设置 Windows 窗体 DataGrid 控件的格式
    ms-help://MS.MSDNQTR.2003FEB.2052/vbcon/html/vbtskformattingthedatagridatdesigntime.htm
      

  4.   

    设置 Windows 窗体 DataGrid 控件的格式
    ms-help://MS.MSDNQTR.2003FEB.2052/vbcon/html/vbtskformattingthedatagridatdesigntime.htm