Is there a way to expand the summary area? I've tried a number of things but it still seems to only allocate a small box in which to enter "Sum = 123456" so the text is always cutoff. I've created a custom summary before and it suffers from the same problem - so my hope is that I'm just doing it wrong. :-)
Infragistics v8.2
.Right); totalSummary.Key = SUMMARY_KEY;}
I tried that and it works for this instance, thanks. Is there any way to allow it to have the entire row available to the summary?
There's no property for that, although now that you mention it, it sounds like a great idea. You should Submit a feature request to Infragistics.
The only way to do it right now would be to use a CreationFilter. This would be a fairly simple CreationFilter, assuming you only have one summary. You would have have to expand the SummaryValueUIElement so that it fills it's parent element.
Something like this:
public class FullLineSummaryCreationFilter : IUIElementCreationFilter { #region IUIElementCreationFilter Members public void AfterCreateChildElements(UIElement parent) { FreeFormSummaryLineUIElement freeFormSummaryLineUIElement = parent as FreeFormSummaryLineUIElement; if (freeFormSummaryLineUIElement != null) { Debug.Assert(freeFormSummaryLineUIElement.ChildElements.Count == 1, "We are asumming that there is only one summary. This code won't work right if there is more than 1."); SummaryValueUIElement summaryValueUIElement = freeFormSummaryLineUIElement.ChildElements[0] as SummaryValueUIElement; if (summaryValueUIElement != null) { summaryValueUIElement.Rect = parent.RectInsideBorders; } else Debug.Fail("The child element of the FreeFormSummaryLineUIElement is not a SummaryValueUIElement; unexpected."); } } public bool BeforeCreateChildElements(UIElement parent) { return false; } #endregion }
That is exactly what I wanted, and with a very simple introduction to using custom Creation Filters too!
I only changed one thing, the object that was being passed in was actually a FixedSummaryLineUIElement instead of the FreeForm, so after (stepping through to identify it) replacing that it worked like a charm.
Thanks again,~Chris
Hi Chris,
What you would have to do is add another summary to the grid in the same place as an existing summary. For example, if you are aligning summaries to the left, right, or center you would simply add a second summary in the same position. By default, the grid will then add an extra summary line so that it can place one summary above the other.
You could also do the same thing by aligning two summaries to the same column.
Mike,
So... as with any project, this one needs an enhancement that would display a second summary row - just what you said this example would not work for. :-)
Basically I have now two columns that I've added summaries to and would like to display each summary on a separate row. I've been working on this modifying the same code, but changing up the placement of the second summary but I can't seem to get it to position under the first one. Is there something special I need to do to make it allocate more space in the summary section in order for this to display properly?
Thanks,~Chris
Oh, yeah, I meant to mention that. If you are using a summary aligned to a column, then it will be in a FixedSummaryLine. If you aligned it to the right (like you had it originally), it would be in a FreeFormSummaryLine. :)