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
1095
XamWebGrid 2009.2 - Enabling Default summary in code
posted

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

Parents Reply Children
No Data