Hi,
Im trying to make the new feature with summary lines work in my app and im running into some trouble.
Im adding my columns in the ColumnLayoutAssigned event. Here i do something similar to this :
------------
ColumnLayout cl = new ColumnLayout();TextColumn tc1 = new TextColumn(){ Key = "Counter", IsSummable = true};SumSummaryOperand sso = new SumSummaryOperand();sso.IsApplied = true;tc1.SummaryColumnSettings.SummaryOperands.Add(sso);cl.Columns.Add(tc1);
e.ColumnLayout = cl;
----------
The xamwebgrid is bound to an observablecollection of some objects containing a "Counter" column.
Ive tested that if i add a column in xaml and turn on Sum there with the IsApplied flag it works fine. However when doing it like i have to in code in my ColumnLayoutAssigned event, the Sum function is not turned on by default when the grid is loaded.
Am i doing something wrong ?
I can post an mockup app if needed.
regards
Øyvind
I am not able to reproduce your results, but one thing you could try is adding the column to the grid prior to adding the SummaryOperand to the collection.
If you have a sample, I will gladly look at it to determine what is going on.
Here is a quick mock up. As the code stands i would expect Sum=XXX in the 2 first columns turned on by default. (Unless ive made a mess of things :p )
Edit : Moockup removed.
I closed this thread myself as i figured out i had done a tiny blunder in my mockup. However, now after going through my mockup properly i find my original question to still be valid. So here is a mockup again that contains the problem.
Questions :
1. So again, as the code stands i would expect to see sums in column 1 and column 2 in the mockup as the "PushMe" button is pressed. On the SumSummaryOperand object ive set the IsApplied property to true. Still no sum when the grid is loaded with data. My object is added and can be found and ticked manually under the "function" icon in the header.
(In the mockup i can resolve the whole problem by instanciating the Items collection to an empty collection . I can however not do this in my main application since im using dynamic types the in collection i bind to and thus only bind towards an IEmumerable and not an observablecollection. So the problem i have in my main application is now the same as in this mockup).
2. If i manually tick the sum function in the header the sum appears, however the formatting in my grid contains a " , " (comma) as decimal separator, but the summary cell contains a " . " (dot) as decimal separator. Both the column and the summary object has its FormatString set to "{0:N4}". Is there something fishy going on there ? :)
Sincerely
I will have more to say on this later this week, early next week. I see the issues you are describing.
I have not registered this issue in the support system and was hoping for a feedback here before i did so.Hopefully its on ure list of things to look at still Darrell ?
regardsØyvind Johnsen
Hello Øyvind,
No I didn't forget about you and these issues.
I have asked our support group to write up incidents for your issues.
Both issues were bugs:
For issue #2, it might be in the upcoming service release as I think I got it in in time.
For issue #1 I was able to reproduce what you were seeing, but that didn't make the SR as I was working on the issue after the SR was closed.
Thank you