Hello,
I tried to find a solution reading the other posts in forum and google, however i am not sure that i have the correct solution in mind.
I am using UltraGrid, but in order to display numeric information with customized behavior based on the system configuration, i have constructed a text wrapper which is attached to a column Editor. Maybe editor is not the best option for the business that i need to cover, but it is an old application with fresh UI.
Textbox (and grid as a consequence), receives a metric numeric value and based on configuration decides if this will be translated to Imperial, with how many digits etc. The issue with digits can be easily handled using the SummarySettings.DisplayFormat, but the problem arises when the value is transformed to Imperial.
Grid summaries doesn't know anything about the transformation, returning all Summaries in Metric.
What i really need is to take the already calculated summary value, translate it to Imperial and give it back to system. However, in OnSummaryValueChanged, summary values are readonly.
An alternative can be to use External Summaries(https://ko.infragistics.com/samples/windows-forms/grid/external-summaries), but in this case i have to calculate the values on my own, right?
What do you suggests?
Thank you in advance for your help.
As you have custom logic to convert the metric numeric values to imperial and as the Grid is not aware of this translation, your assumption is correct. You need to use the ExternalSummaries to implement the custom summary logic that translates the Grid summaries to imperial.
Please let me know if I may be of further assistance.
Sincerely,Sahaja KokkalagaddaAssociate Software Developer
That's great. I applied your suggestion and the summaries are calculated as expected.
Next, i tried to export to excel, but in this case, i lost again the value - since Grid exports the known to him values - not the formatted.
Do we have any way to override these values too?
I tried using SummaryCellExporting event, but in this case the Summary.value is locked too.