Filtering is applied, if you clear the filter descriptors and enable/disable custom filtering. Steps to reproduce:
1. Click on the filter button on the Name header. Check only one name, and only one record should be visible in the grid.
2. Click the Clear button. All records should now be visible.
3. Click the Toggle Filter button once, to enable custom filtering.
4. Click the Toggle Filter button again to disable custom filtering.
Workaround:
private static readonly FieldInfo FilterContextFieldInfo = typeof(RadCollectionView<GridViewRowInfo>).GetField("filterContext", BindingFlags.NonPublic | BindingFlags.Instance);
this.radGridView1.FilterDescriptors.Clear();
StringCollection filterContext = FilterContextFieldInfo.GetValue(this.radGridView1.MasterTemplate.DataView) as StringCollection;
filterContext.Clear();
Steps to reproduce: 1. Add a RadGridView to a form 2. Add several columns and set their MinWidth to 0 3. Set the grid AutoSizeColumnsMode property to Fill 4. Run the project and you will see that you cannot resize the columns. WORKAROUND: Set the MinWidth property to a value greater than 0
The issue is reproduced when the columns for GridViewTemplate are added last in the end after the all hierarchy settings: relations, templates
To reproduce: GridViewMaskBoxColumn maskBoxColumn = new GridViewMaskBoxColumn(); maskBoxColumn.Name = "MaskEditBoxColumn"; maskBoxColumn.HeaderText = "MaskEditBoxColumn"; maskBoxColumn.MaxLength = 5; maskBoxColumn.MaskType = MaskType.Numeric; maskBoxColumn.Mask = "C"; maskBoxColumn.FormatString = "{0:C}"; radGridView1.MasterTemplate.Columns.Add(maskBoxColumn); WORKAROUND: void radGridView1_CellEditorInitialized(object sender, GridViewCellEventArgs e) { GridSpinEditor editor = e.ActiveEditor as GridSpinEditor; if (editor != null) { GridSpinEditorElement element = (GridSpinEditorElement)editor.EditorElement; element.TextChanging += element_TextChanging; } } void element_TextChanging(object sender, TextChangingEventArgs e) { e.Cancel = e.NewValue.Length > 5; }
Comment : Removed the MaxLength property from GridViewMaskBoxColumn. You should use the Mask property and set an appropriate mask value. For example the #### mask allows entering only 4 digits.
The RadGridView throws unhandled exception, when you try to close the custom filtering form twice for invalid filter descriptor.
1. Create a new project with RadGridView. 2. Make all columns read only. 3. Use Ctrl+x, +v and +c key combinations.
1. Create RadGridView with hierarchy. 2. Set UseScrollbarsInHierarchy property to true. 3. Handle the CellDoubleClick event. 4. Run the project, open a child view and double click on its scrollbar. The CellDoubleClick event will fire which is wrong.
To reproduce:
- add a grid to the form and use the following code for its setup:
radGridView2.Columns.Add("ID");
radGridView2.Columns.Add("Title");
radGridView2.MultiSelect = true;
radGridView2.Columns[0].SortOrder = RadSortOrder.Ascending;
radGridView2.ReadOnly = true;
radGridView2.BeginUpdate();
for (int i = 0; i < 5; i++)
{
GridViewDataRowInfo row = new GridViewDataRowInfo(radGridView2.MasterTemplate.MasterViewInfo);
row.Cells["ID"].Value = i;
row.Cells["Title"].Value = "Title " + i;
radGridView2.Rows.Add(row);
}
radGridView2.EndUpdate(true);
radGridView2.Rows[0].IsCurrent = true;
radGridView2.Rows[0].IsSelected= true;
- Once the application is started, hold down the shift key and click the third row in the grid
Expected result: the first three rows are selected
Actual result: the last three rows are selected
WORKAROUND:
Use the BeginUpdate and EndUpdate methods of the TableElement, not the control:
radGridView2.TableElement.BeginUpdate();
//add rows
radGridView2.TableElement.EndUpdate(true);
Filtering does not work correctly when NotConains and Contains filters are combined.
Work around:
private void radGridView1_FilterExpressionChanged(object sender, FilterExpressionChangedEventArgs e)
{
List<string> filterExpressions = new List<string>();
for (int i = 0; i < this.radGridView1.FilterDescriptors.Count; i++)
{
FilterDescriptor descriptor = this.radGridView1.FilterDescriptors[i];
string expression = null;
CompositeFilterDescriptor compositeFilterDescriptor = descriptor as CompositeFilterDescriptor;
if (compositeFilterDescriptor != null)
{
expression = CompositeFilterDescriptor.GetCompositeExpression(compositeFilterDescriptor);
}
else
{
expression = FilterDescriptor.GetExpression(descriptor);
}
if (!string.IsNullOrEmpty(expression))
{
filterExpressions.Add("(" + expression + ")");
}
}
string logicalOperator = (this.radGridView1.FilterDescriptors.LogicalOperator == FilterLogicalOperator.And) ? " AND " : " OR ";
string resultExpression = String.Join(logicalOperator, filterExpressions.ToArray());
e.FilterExpression = resultExpression;
}
Export to excel fails when there is null values for GridViewDateTimeColumn. The following code snippet reproduce the issue: ExportToExcelML export = new ExportToExcelML(gridView); export.HiddenColumnOption = HiddenOption.DoNotExport; export.HiddenRowOption = HiddenOption.DoNotExport; export.ExportVisualSettings = false; export.SheetMaxRows = ExcelMaxRows._1048576; export.RunExport(targetFileName);
This method should return true if successful.
FIX. RadGridViiew - HierarchyLevel property shows incorrect hierarchy level for GridNewRowElement in grid with hierarchy.
The alternating row color in RadGridView does not work when the control is in unbound mode and LoadFrom method is used. Resolution: The issue is duplicated with feedback item FIX. RadGridView - AlternatingRowColor does not work when data is loaded in the RadGridView from a IDataReader Here is the link to item: http://feedback.telerik.com/Project/154/Feedback/Details/112656-fix-radgridview-alternatingrowcolor-does-not-work-when-data-is-loaded-in-the-r
Object-hierarchy produces same child rows for every parent row.
If RadDropDownListEditor has DropDown style and you write a value which exists in the underline data source, it does not become current value.
The summary aggregate expression IIF(SUM(RecordCount) = 0, 0, 1/SUM(RecordCount)) causes exception in RadGridView.
The display member for empty string value in GridViewComboBoxColumn is not displayed. The following code reproduces the issue:
GridViewComboBoxColumn cboInsRslCd = new GridViewComboBoxColumn();
cboInsRslCd.DataType = typeof(string);
List<ItemComboBox> liste = new List<ItemComboBox>();
liste.Add(new ItemComboBox("", "[None]"));
liste.Add(new ItemComboBox("A", "A"));
liste.Add(new ItemComboBox("B", "B"));
liste.Add(new ItemComboBox("C", "C"));
cboInsRslCd.DataSource = liste;
cboInsRslCd.ValueMember = "CleItem";
cboInsRslCd.DisplayMember = "ValeurItem";
cboInsRslCd.NullValue = "[None]";
this.radGridView1.Columns.Add(cboInsRslCd);
WORKAROUND: subscribe to the CellEndEdit event and change the stored value in the event handler:
private void RadGridView1_CellEndEdit(object sender, GridViewCellEventArgs e)
{
if (e.Value == null)
{
e.Row.Cells[e.Column.Name].Value = "";
}
}
http://www.telerik.com/community/forums/radgridview-comboboxcolumn-displays-no-value-for-member-with-empty-string-value-is-selected
Improve editors in RadGridView by allowing clipping when the control is scrolled.
Column Chooser form's BackColor cannot be set trough Theme.
Steps to reproduce: 1. Addd a numeric (decimal) column to a grid 2. Enable filtering 3. Select 'Greater Than' filter 4. Enter '0' in the Spin Editor that appears You will see that no filtering occurs. Enter any other digit instead of 0 and filtering is performed.