1. In many projects, statistics on certain columns are often implemented. DevExpress control Gridcontrol Implementing these functions requires only certain properties to be set to meet the requirements. The following examples give a count of the total number of classes, total numbers, and total scores. As follows:
2, the code used basically only bound data, the case data code is as follows:
DataTable dt =NewDataTable (); Dt. Columns.Add ("A1"); Dt. Columns.Add ("A2"); Dt. Columns.Add ("A3"); for(inti =1; I < One; i++) { if(i<4) {dt. Rows.Add ("three years ("+i+") class", -+5I $* ( -+5*i)); Continue; } Else if(i<8) {dt. Rows.Add ("Four years ("+ i +") class", at+5I the* ( at+5*i)); Continue; } Else{dt. Rows.Add ("Five years ("+ i +") class", -+5I the* ( -+5*i)); }} Gridcontrol1.datasource=DT; }
3, the description of thousands of words, are not as reliable as source code. Source code download link is available here (no credit required): http://download.csdn.net/detail/kehaigang29/8845879
DevExpress table Gridcontrol implements column statistics, totals, averages, sums, and so on.