This is a migrated thread and some comments may be shown as answers.

radgridview can't display summaryrowsbottom value

1 Answer 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
forrest
Top achievements
Rank 1
forrest asked on 27 Mar 2013, 02:59 AM
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);     

}




1 Answer, 1 is accepted

Sort by
0
Julian Benkov
Telerik team
answered on 29 Mar 2013, 02:59 PM
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.
Tags
GridView
Asked by
forrest
Top achievements
Rank 1
Answers by
Julian Benkov
Telerik team
Share this question
or