Completed
Last Updated: 21 Jul 2011 10:31 by ADMIN
ADMIN
Julian Benkov
Created on: 21 Jul 2011 10:31
Category: GridView
Type: Bug Report
3
Grouping does not work properly in unbound mode
Group Descriptors are added before adding rows in unbound mode and not using defer refresh or Begin/EndUpdate
test:
----------------------------------------------------
using System.ComponentModel;
using System.Windows.Forms;
using Telerik.WinControls.UI;
namespace Lab.Grid
{
public partial class GridGroupInUnboundMode : MainForm
{
private RadGridView gridView = new RadGridView();
public GridGroupInUnboundMode()
{
InitializeComponent();
this.gridView.Dock = DockStyle.Fill;
this.gridView.Parent = this;
this.gridView.BringToFront();
gridView.GroupDescriptors.Add("Name", ListSortDirection.Ascending);
GridViewTextBoxColumn col = new GridViewTextBoxColumn();
col.HeaderText = col.Name = "Id";
col.DataType = typeof(int);
gridView.Columns.Add(col);
col = new GridViewTextBoxColumn();
col.HeaderText = col.Name = "Name";
col.DataType = typeof(string);
gridView.Columns.Add(col);
col = new GridViewTextBoxColumn();
col.HeaderText = col.Name = "Sum";
col.DataType = typeof(double);
gridView.Columns.Add(col);
}
protected override void OnButton1Click()
{
gridView.Rows.Add(1, "Ivan", 123.56);
gridView.Rows.Add(2, "Ivan", 372.90);
gridView.Rows.Add(3, "Peter", 500.00);
}
protected override void OnButton2Click()
{
gridView.Rows.Add(4, "George", 300.00);
gridView.Rows.Add(5, "George", 600.00);
gridView.Rows.Add(6, "George", 100.00);
gridView.Rows.Add(7, "Enzo", 78.00);
}
protected override void OnButton3Click()
{
gridView.Rows.Add(8, "Enzo", 100.00);
gridView.Rows.Add(9, "Enzo", 200.00);
gridView.Rows.Add(10, "Enzo", 300.00);
}
}
}
0 comments