1. Create a new project with RadGridView and bind it. 2. Setup 2 level grouping. 3. Add top summary row. 4. Set the ShowParentGroupSummaries property to true. 5. Run the project and expand a group. 6. Edit a cell from a column that has a summary item attached. 7. Notice that the parent summary row is not updated properly.
To reproduce:
- use the code below to create an application
- start it and click the Id column twice (so you will sort it first ascending and then descending)
- double click the first row (with ID=9) => the BindingList current is still the row with ID 0, while it should be the row with ID 9
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
SetDefaults();
}
private void SetDefaults()
{
radGridView1.MasterTemplate.AutoGenerateColumns = false;
radGridView1.MasterTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.None;
radGridView1.MasterTemplate.EnableAlternatingRowColor = true;
radGridView1.TableElement.AlternatingRowColor = Color.FromArgb(0xEB, 0xEF, 0xFB);
radGridView1.MasterTemplate.ShowGroupedColumns = true;
radGridView1.MasterTemplate.EnableGrouping = true;
radGridView1.MasterTemplate.MultiSelect = false;
radGridView1.EnableFiltering = true;
radGridView1.EnableFastScrolling = true;
radGridView1.TableElement.TableHeaderHeight = 50;
}
private void Form1_Load(object sender, EventArgs e)
{
var users = new EmployeeList();
for (int i = 0; i < 10; i++)
{
var user = new Employee();
user.Id = i;
user.Name = "John Doe " + i;
users.Add(user);
}
employeeListBindingSource.DataSource = users;
}
private void radGridView1_CellDoubleClick(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
if (e.RowIndex == -1 || e.Row.RowElementType != typeof(GridDataRowElement) || !(e.Row is GridViewDataRowInfo))
return;
var selectedUser = employeeListBindingSource.Current as Employee;
MessageBox.Show(selectedUser.Name);
}
}
public class Employee
{
public int Id { get; set; }
public string Name { get; set; }
public Employee()
{
}
}
public class EmployeeList : BindingList<Employee>
{
public EmployeeList()
{
}
}
To reproduce: rgvTest.BeginUpdate() For ixTest As Integer = 1 To 2000 Dim rgvrTest As GridViewRowInfo = rgvTest.Rows.AddNew rgvrTest.Cells(0).Value = "Value " & ixTest.ToString Next rgvTest.EndUpdate() rgvTest.Rows(0).IsCurrent = True MessageBox.Show(rgvTest.CurrentCell.RowIndex.ToString)
1. Create a RadGridView and setup hierarchy. 2. Add a group descriptor and several rows in the child view so that when expanding it scrollbar appears. 3. Run the project and expand the first row (there should be only one row at first level and one group at second level).
1. Create a new project with RadGridView. 2. Bind it to a business object collection without rows. 3. Add a descending sort descriptor for a date time column. 4. Add a button and on its click event add a new row to the collection. The new row should have first column with data which produces different sort results than the date time column. 5. Run the project and add some rows.
To reproduce - bind the grid to a binding list - pin one of the rows - delete this row from the binding list - click somewhere on the grid => exception is thrown
Plese download the attached project and run it. It uses some of our internal data so plese keep it private. Once you get the GridView with the data do the following: 1. Click on "Mahine speed" Header to change sort order. 2. Open "Mahine speed" filter and deselect all and select 1 3. Open "Mahine speed" filter and deselect 1 and select 2 4. Open "Mahine speed" filter and deselect 2 and select 3 5. Open "Mahine speed" filter and deselect 3 and select 1 At this point you get the crash. The above steps are for you to be able to reproduce the issue,, in general terms, the issue happens if I reproduce the same steps in any Combobox column. This is causing crashes all along my project since most of the forms in my project are gridviews and users use a lot sorting and filtering to get to the needed data.
To reproduce use the code above and when the application starts double click the column in order to best fit it : RadGridView radGridView1 = new RadGridView();
this.Controls.Add(radGridView1);
radGridView1.Columns.Add("some text");
radGridView1.HideSelection = true;
Allow drag and drop of rows, when RadGridView is in bound mode. Please refer to the following article demonstrating how to do that: http://www.telerik.com/help/winforms/gridview-rows-drag-and-drop.html
There should be a way to enable the auto filter functionality of Excel when exporting a grid through ExportToExcelML.
To enable the AutoFilter for cells C1 to C4 on row 2:
ExportToExcelML exporter = new ExportToExcelML(this.radGridView1);
exporter.ExcelTableCreated += new ExcelTableCreatedEventHandler(exporter_ExcelTableCreated);
exporter.RunExport(file.FullName);
private void exporter_ExcelTableCreated(object sender, ExcelTableCreatedEventArgs e)
{
AutoFilterElement el = new AutoFilterElement();
el.Attributes.Add("x:Range", "R2C1:R2C4");
el.Attributes.Add("xmlns", "urn:schemas-microsoft-com:office:excel");
e.ExcelTableElement.Workbook.Worksheets[0].InnerElements.Add(el);
}
private class AutoFilterElement : Telerik.WinControls.UI.Export.ExcelML.ElementBase
{
protected override string StartTag
{
get { return "<AutoFilter{0}>"; }
}
protected override string EndTag
{
get { return "</AutoFilter>"; }
}
}
Closing a form in CellDoubleClick event causes NullReferenceException in RadGridView.
When RadGridView is scrolled while selecting (SelectionMode is CellSelect), the control throws exception.
When you copy from excel & if there are some empty columns in the excel file those empty columns aren't copied.The grid simply ignores the empty columns.Just run the attached sample project and copy the content from excel file and paste on the grid.T
1. Create a new project with RadGridView and setup hierarchy with three levels. 2. Add a button and when handling its Click event call the ExpandAll method. 3. Run the project and expand the first row. 4. Click the button.
1. Create a new project with RadGridView. 2. Setup hierarchy with two child templates. 3. Set the AutoSizeRows to true. 4. Run the project, select the second template on 5 consecutive rows. 5. Start scrolling up and down with the mouse wheel slowly. 6. Click on a child row.
FIX. RadGridView - FilterOperator.IsEqualTo and FilterOperator.IsNotEqualTo should work with null using System; using System.Data; using System.Windows.Forms; using Telerik.WinControls.Data; using Telerik.WinControls.UI; namespace Lab.Grid { public partial class GridFilterEqualNullSupport : MainForm { private RadGridView gridView = new RadGridView(); public GridFilterEqualNullSupport() { InitializeComponent(); gridView.Dock = DockStyle.Fill; gridView.Parent = this; gridView.BringToFront(); gridView.EnableFiltering = true; } protected override void OnLoad(EventArgs e) { base.OnLoad(e); DataTable table = new DataTable(); table.Columns.Add("Id", typeof(int)); table.Columns.Add("Name"); table.Columns.Add("Number", typeof(DateTime)); table.Rows.Add(1, "Ivan", DateTime.Now); table.Rows.Add(2, "Ivan", DateTime.Now.AddDays(-1)); table.Rows.Add(null, "Peter", DateTime.Now); table.Rows.Add(4, "George", null); table.Rows.Add(5, "George", null); table.Rows.Add(null, "George", null); table.Rows.Add(7, "Enzo", DateTime.Now.AddDays(-3)); table.Rows.Add(8, "Enzo", DateTime.Now.AddDays(5)); table.Rows.Add(null, "Enzo", null); table.Rows.Add(10, "Enzo", DateTime.Now.AddDays(-1)); gridView.DataSource = table; } protected override void OnButton1Click() { base.OnButton1Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton2Click() { base.OnButton2Click(); FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsNotEqualTo, null); gridView.FilterDescriptors.Add(filter1); } protected override void OnButton3Click() { FilterDescriptor filter1 = new FilterDescriptor("Id", FilterOperator.IsEqualTo, ""); gridView.FilterDescriptors.Add(filter1); } } }
1. Open attached project and run it. 2. Click button 1 and you will see that is not apply
Use the ticket project: - type in filtercell T2 the following text: test - make no commit of the filter cell! - click directly on the radbutton of the ribbonbar - click in the filter cell of T2 - click in grid - click in filter cell of T2 - click in grid
1. Create a new project with RadGridView and bind it. 2. Run the application. 3. Double click on a column to best fit. 4. Double click the same column twice
Steps to reproduce. 1. Add a RadGridView to a form 2. Add a decimal column and set its DataType to any unsigned integer type (uint16, uint32, uint64) 3. Add some values and export the grid with ExportToExcelML 4. You will see that in the exported grid the cells in the column would have "0" as a value.
There is an exception in RadGridView when using conditional formatting and sorting the grid descending.