private int DisplayColumnHeaders(object dataSource, int topRow, int leftColumn)
        {
            // Get column headers from the data source
            PropertyDescriptorCollection pdc = DataSourceHelper.GetSourceProperties(dataSource);

            for (int i = 0; i < pdc.Count; i++)
            {
                PropertyDescriptor pd = pdc[i];
                spreadsheetControl1.ActiveWorksheet[topRow, i + leftColumn].Value = pd.DisplayName;
            }
            return(pdc.Count);
        }
コード例 #2
0
 static List <Fish> GetDataSource()
 {
     return(DataSourceHelper.GetDataSouresFromXml <Fish>("fishes.xml", "Fishes"));
 }