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
590
XamWebGrid Summary Row custom Text
posted

I using XamWebGrid 10.1 with ColumnLayout and Summaries inside.  In each column layout I am showing Countries; i.e. USA, Canada, Mexico.  What I would like for the summary in each is to say "Total for USA", "Total for Canada", "Total for Mexico".  It seems the only way to get access to the summary is through a converter, but when it converts there is no access to and of the Grid properties. Is there anyway to achieve this?

 

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            if ((value as SummaryResult).SummaryDefinition.ColumnKey == "Country")
            {
               //here is where I was trying to doing something special

            }
            else
            {
                return (value as SummaryResult).Value as String;
            }
        }
Parents
No Data
Reply
  • 21382
    posted

    Just to be sure about what you are asking.

     

    Are you using group by on the column and inside a group looking to change the caption of the summary

     

    USA

     --- DataRow

    --- DataRow

     -- summaryRow Total for USA = X;

    Canada

    -- data

    -- data

    -- summaryrow Total for Canada = Y

     

    or are you trying to show muliple summaries in single , flat situation?

     

    The SummaryOperand that wraps the summary definition is defined on the columnlayout level.  So any changes you make to that object would ultimately change all the summary rows on the same column layout.

     

    so could you explain your set up a little more so I know exactly what you are doing?

     

Children