RadGridView Aggregate Result

2 posts, 0 answers
  1. Ivy
    Ivy avatar
    8 posts
    Member since:
    Oct 2009

    Posted 14 Dec 2009 Link to this post

    I am using the grouping functionality of RadGridVIew.  By dragging columns I was able to get columns' sum - displaying in this format

    Column1 | Total: 89
    Column2 | Total: 50

    Now, what I need is to capture this result and place it in a Dictionary object wherein the key is the column name and the value is the Total count.  How can I capture the result and save it?
  2. Ivy
    Ivy avatar
    8 posts
    Member since:
    Oct 2009

    Posted 17 Dec 2009 Link to this post

    found a solution:


    public void BindChart(string aggregateFunction, GroupDescriptorCollection gridGroupDescriptors, object gridItemsSource, string[] dataSets)




    RadChart1.ItemsSource = Translate(gridItemsSource);



    ChartAggregateFunction aggFunct = (ChartAggregateFunction)Enum.Parse(typeof(ChartAggregateFunction), aggregateFunction, true);



    foreach (string dataSet in dataSets)




    SeriesMapping mapping = new SeriesMapping();




    new ItemMapping(dataSet, DataPointMember.YValue, aggFunct));



    mapping.SeriesDefinition =

    new BarSeriesDefinition();




    Assign Axis Y



    //if (RadChart1.SeriesMappings.Count > 1)






    // RadChart1.DefaultView.ChartArea.AdditionalYAxes.Add(GenerateYAxis(dataSet));



    // mapping.SeriesDefinition.AxisName = dataSet;







    ChartGroupDescriptorCollection chartGroupDescriptors = new ChartGroupDescriptorCollection();



    foreach (GroupDescriptor descriptor in gridGroupDescriptors)



    new ChartGroupDescriptor(descriptor.Member, descriptor.MemberType));



    GroupDescriptor lastGroupDescriptor;



    if (gridGroupDescriptors.Count > 0 && aggregateFunction.ToLower() != "none")



    lastGroupDescriptor = gridGroupDescriptors[gridGroupDescriptors.Count - 1];


    new ItemMapping(lastGroupDescriptor.Member, DataPointMember.XCategory));






Back to Top