Hi, I've a complicated requirement for Xamgrid grouping and summary row:
I've below data:
Store,Product,SizeS,SizeM,SizeL
s1, p1, 1,2,3
s1, p2, 3,2,4
s2, p1, 4,5,3
s2, p2, 7,5,3
now, I want to show this data in xamgrid with summary & group.
I grouped the data on Store, so, it looks like (expanded):
v s1
v s2
But, I want it to be shown like:
store, sizeS, sizeM, SizeL
>s1, 4,4,7
>s2, 11,10,6
(notice, the figures are Sum of sizes)
here ">" show its expandable. and upon expanding first store:
v s1, 4, 4, 7
product, sizeS, SizeM, SizeL
p1, 1,2,3
p2, 3,2,4
Any pointers, pls??
Hello Vijay,
Did you have the chance to take a look at the link I have provided in the reffered forum thread. There it is explained step by step how to achieve the functionality you want. Here is the link again:
http://help.infragistics.com/Help/NetAdvantage/WPF/2013.1/CLR4.0/html/xamGrid_Display_Summary_Row_in_xamGrid_GroupBy_Headers.html
Hope this helps you.
hi,
nice idea.
however, i dont get my XamGrid object in the Convert method, so i cant do something like
public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture) { return value.ToString(); //return (parameter as XamGrid).Columns[value.ToString()].HeaderText; }:
i want to run the commented code somehow.
I tried passing in ConverterParamter={MyXamGridObject}
<TextBlock Text="{Binding Key, Converter={StaticResource CNConverter}, ConverterParameter={StaticResource MyXamGridObject}}" FontSize="11" />
but no luick. :(
Thank you for your feedback. I am glad that you were able to resolve one of your issues, as for the other one I can suggest you see this forum thread:
http://ko.infragistics.com/community/forums/p/75549/381916.aspx
where a similar issue is discussed. Please let me know if this helps you or you need further assistance on this matter.
Looking forward for your reply.
Hi,
Got Solution for the 2nd part: Summary Update:
row.Manager.RefreshSummaries();
refreshes the summary for the selected row.
Putting Column header text (instead of the column key) in the Summary header template is still pending.
Thanks!
Hi Stefan,
I am trying and getting towards what I want. I managed to get the dynamic columns added to the header. phew..!!
Few queries though:
1. The Headers: I want to display the header text of my columns, however, the code suggests use of "key"
<TextBlock Text="{Binding Key}" ... /> which is infact, SummaryDefinition's ColumnKey property.
how to get the actual column headers instead of the key??
2. Summary Header update: My grid is editable. so when user edits the value in one of the cell, the "sum" should get reflected in the Header, which currently not happening. Any clue?