I am utilizing the EnableSumary for a wingrid.. I have formatted several of the columns.. but when i use the summary tool.. i don't get those formats applied.. is there a way to do this?
So for example I go through and set a column format like so..
UltraGridcolumn.Format = "#,##0.000";
All of the data is then formatted correctly in the grid.. however, when I click the Summary E in the column Header.. the number listed is not fomatted.. is there a way to format this Summary Number?
It looks like this...
ID Header sum = 706271 2565.0002 2911.0003. 1784.000
etc...
I would not do this in SummaryValueChanged. I would do it when you add the summary, as I did in the code I posted above. Otherwise you will be continually setting and resetting the property to the same value, which is inefficient.
thanks, so on the event for SummaryValueChanged I want to set the display format to the format of that specific column, do you know how I can get the column name or index?
Right now I am setting it like this.
private void ultraGrid1_SummaryValueChanged(object sender, SummaryValueChangedEventArgs e) { e.SummaryValue.SummarySettings.DisplayFormat = "{0:###,###,###,###,###.##}"; }
When you create your summary using Summaries.Add, the Add method returns a SummarySettings object.
SummarySettings summarySettings = band.Summaries.Add(...);
summarySettings.DisplayFormat = "{0:#,##0.000}";
can you give me some code on how to set it?
all I could find was
grid.DisplayLayout.Override.SummaryValueAppearance and I cant specify a column for this.
I set the column with
grid.DisplayLayout.Bands[0].Columns[colName].Format = "###,###,###,###,###.##";
Also the format string is different "{0:#,##0.000}"
Nick