radgridview can't display summaryrowsbottom value

2 posts, 0 answers
  1. forrest
    forrest avatar
    1 posts
    Member since:
    Jun 2012

    Posted 26 Mar 2013 Link to this post

    I use radgridview control to fill tablea and tableb datasource.
    in frmA and frmB I use same mothod 
     set radgridview property->summaryrowsbottom->sum filedname
    in frmA recordset count is 10 ->radgridview summary display ok (sql: select * from table a)
    but in frmB recordset count is 300 ->radgridview summary can't display from the gridview bottom  (sql:select * from tableb)

    if frmB recordset count is 10  ->radgridview summary display ok (sql:select top 10 * from tableb)
    how can i display summaryrowsbottom value in a lot of rows?
    thanks!

    2013.03.28
     
    I use code 
    private RadGridView radGridView1;
    private GridViewSummaryItem  summaryItem1;
      
      private void LoadData()
    {
    tbladapter.fillbydate(ds.tbla,begindate,enddate);
         summaryItem1 = new GridViewSummaryItem("Id""Sum of Id: {0}", GridAggregateFunction.Sum);
         var summaryRow1 = new GridViewSummaryRowItem(new[] {summaryItem1});

           //if I add onece the radgridview can't display in 299 recordset
            radGridView1.SummaryRowsBottom.Add(summaryRow1);     
           //if I add two same method the radgridview can display summary ok 
           radGridView1.SummaryRowsBottom.Add(summaryRow1);     

    }




  2. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 29 Mar 2013 Link to this post

    Hi Shenglong,

    I have tested the reported scenario and I could not find the issue with the SummaryRowsBottom collection of RadGridView. Here is my test code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Linq;
    using System.Text;
    using System.Windows.Forms;
    using Telerik.WinControls.UI;
     
    namespace WindowsFormsApplication2
    {
        public partial class Form1 : Form
        {
            private RadGridView gridView = new RadGridView();
     
            public Form1()
            {
                InitializeComponent();
     
                gridView.Dock = DockStyle.Fill;
                gridView.Parent = this;
                gridView.BringToFront();
     
                DataTable table = new DataTable();
                table.Columns.Add("Name");
                table.Columns.Add("Value", typeof(double));
                table.Columns.Add("Category");
     
                table.Rows.Add("Name1", 1.5, "C1");
                table.Rows.Add("Name2", 2.4, "C1");
                table.Rows.Add("Name3", 3.3, "C1");
                table.Rows.Add("Name4", 4.2, "C2");
                table.Rows.Add("Name5", 5.1, "C2");
     
                gridView.DataSource = table;
                gridView.BestFitColumns();
     
                GridViewSummaryRowItem sumRowBottom1 = new GridViewSummaryRowItem();
                sumRowBottom1.Add(new GridViewSummaryItem("Value", "Sum: {0:F2}; ", GridAggregateFunction.Sum));
                
                gridView.SummaryRowsBottom.Add(sumRowBottom1);
            }
        }
    }

    Please review the attached screenshot for details. 

    Can you please provide me with more details on how to reproduce the issue on my end?

    Greetings,
    Julian Benkov
    the Telerik team
    WinForms Q1 2013 boasts PivotGrid, PDF Viewer, Chart enhancements and more. Check out all of the latest highlights.
Back to Top