Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
45
Ultragrid SammerySettings.DysplayFormat pace holder for literal.
posted

I have a bool column in a grid with groupings. In order to display an indicator on the group row that shows if any of the child rows in the group are checked I used a CustomSummaryCalculator class that looks like this.

internal class DoFxCustomSummary : ICustomSummaryCalculator

{

private bool total;

public void BeginCustomSummary(SummarySettings summarySettings, RowsCollection rows)

{

total = false;

}

 

public void AggregateCustomSummary(SummarySettings summarySettings, UltraGridRow row)

{

if(total)

{

total = true;

}

else

{

if(((FXOMAllocationBean)row.ListObject).DoFx)

{

total = true;

}

}

}

public object EndCustomSummary(SummarySettings summarySettings, RowsCollection rows)

{

if(total)

{

return "X";

}

return "";

}

}

This code works fine except when the value show up in the grid group row it picks up the default format and looks like this Summary = X. O only what to see X. I need to set the DisplayFormat property of the SummarySetting to something that will have a place holder for a literal and for the life of me I cannot find how to do it.  I have seen a million examples of numeric formats or date formats but nothing that contains a literal. At this point I am going a bit nuts. So far I spent 2 days for something so trivial.  PLEASE HELP!!!