Home > Net >  Seek advice, how dev in single row at the bottom of the summary, on the basis of the multi-column su
Seek advice, how dev in single row at the bottom of the summary, on the basis of the multi-column su

Time:09-21

As shown in figure, there have been at the bottom of the summary, but the single, want to specified blue red double row and double row again to carry on the summary, please advice

CodePudding user response:

Code is as follows, with designer words found on other blogs can be achieved, but converted into don't know how...

 
//the view editor to prevent trigger other events
The BeginUpdate ();
//data editing
The BeginDataUpdate ();
View. The Bands. The Clear ();
View. The Columns. The Clear ();
//create the first column
GridBand bandNCCode=view. Bands. AddBand (" product number ");
GridBand bandNCName=view. Bands. AddBand (" product name ");
GridBand bandInToday=view. Bands. AddBand (" library today ");
//the first column binding field
BandNCCode. Columns. The Add (new BandedGridColumn () {FieldName="bandNCCode", Visible=true});
BandNCName. Columns. The Add (new BandedGridColumn () {FieldName="bandNCName", Visible=true});
//create the second column
GridBand bandInCT=bandInToday. Children. AddBand (" factory ");//put in storage today
GridBand bandInCTM=bandInToday. Children. AddBand (" factory mentioned amount ");
GridBand bandInYT=bandInToday. Children. AddBand (" court ");
GridBand bandInYTM=bandInToday. Children. AddBand (" hospital lift amount ");
//the second column binding field
BandInCT. Columns. The Add (new BandedGridColumn () {FieldName="bandInCT", Visible=true});
BandInCTM. Columns. The Add (new BandedGridColumn () {FieldName="bandInCTM", Visible=true});
BandInYT. Columns. The Add (new BandedGridColumn () {FieldName="bandInYT", Visible=true});
BandInYTM. Columns. The Add (new BandedGridColumn () {FieldName="bandInYTM", Visible=true});
//at the bottom of the summation
View. OptionsView. ShowFooter=true;
String [] sum={" bandInCT ", "bandInCTM", "bandInYT", "bandInYTM"};
Foreach (var I in sum)
{
The Columns [I]. SummaryItem. SummaryType=DevExpress. Data. SummaryItemType. Sum;
The Columns [I]. SummaryItem. DisplayFormat="{0}";
}
//end data editing
The EndDataUpdate ();
//end view of editing
The EndUpdate ();
  • Related